Skip to content

Commit

Permalink
Comment out skipped tests
Browse files Browse the repository at this point in the history
They'll likely stay skipped for another while now, and reminders have
been set up on the GitHub issue tracker to implement the relevant
functionality. Until then, there seems little point in getting a warn-
ing on every build.
  • Loading branch information
stakx committed Sep 25, 2017
1 parent 99da297 commit e51453e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 39 deletions.
14 changes: 7 additions & 7 deletions UnitTests/Linq/SupportedQuerying.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ public void WhenQueryingWithEnumValue_ThenSetsPropertyValue()
Assert.Equal(AttributeTargets.Class, target.Targets);
}

[Fact(Skip = "Not implemented yet. Need to refactor old matcher stuff to the new one, require the MatcherAttribute on matchers, and verify it.")]
public void WhenQueryingWithItIsAny_ThenThrowsNotSupportedException()
{
var target = Mocks.Of<IFoo>().First(f => f.Targets == It.IsAny<AttributeTargets>());

Assert.Equal(AttributeTargets.Class, target.Targets);
}
//[Fact(Skip = "Not implemented yet. Need to refactor old matcher stuff to the new one, require the MatcherAttribute on matchers, and verify it.")]
//public void WhenQueryingWithItIsAny_ThenThrowsNotSupportedException()
//{
// var target = Mocks.Of<IFoo>().First(f => f.Targets == It.IsAny<AttributeTargets>());
//
// Assert.Equal(AttributeTargets.Class, target.Targets);
//}

public interface IFoo
{
Expand Down
26 changes: 13 additions & 13 deletions UnitTests/MockedEventsFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,19 +397,19 @@ public void RaisesThrowsIfEventNonVirtual()
() => mock.SetupSet(m => m.Value = It.IsAny<int>()).Raises(m => m.ClassEvent += null, EventArgs.Empty));
}

[Fact(Skip = "Events on non-virtual events not supported yet")]
public void EventRaisingFailsOnNonVirtualEvent()
{
var mock = new Mock<WithEvent>();

var raised = false;
mock.Object.ClassEvent += delegate { raised = true; };

// TODO: fix!!! We should go the GetInvocationList route here...
mock.Raise(x => x.ClassEvent += null, EventArgs.Empty);

Assert.True(raised);
}
//[Fact(Skip = "Events on non-virtual events not supported yet")]
//public void EventRaisingFailsOnNonVirtualEvent()
//{
// var mock = new Mock<WithEvent>();
//
// var raised = false;
// mock.Object.ClassEvent += delegate { raised = true; };
//
// // TODO: fix!!! We should go the GetInvocationList route here...
// mock.Raise(x => x.ClassEvent += null, EventArgs.Empty);
//
// Assert.True(raised);
//}

[Fact]
public void EventRaisingSucceedsOnVirtualEvent()
Expand Down
38 changes: 19 additions & 19 deletions UnitTests/PropertiesFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,24 @@ public void ShouldSetIndexerWithValueMatcher()
foo.Object[0] = "foo";
}

[Fact(Skip = "Not supported for now")]
public void ShouldSetIndexerWithIndexMatcher()
{
var foo = new Mock<IIndexedFoo>(MockBehavior.Strict);

foo.SetupSet(f => f[It.IsAny<int>()] = "foo");

foo.Object[18] = "foo";
}

[Fact(Skip = "Not supported for now")]
public void ShouldSetIndexerWithBothMatcher()
{
var foo = new Mock<IIndexedFoo>(MockBehavior.Strict);

foo.SetupSet(f => f[It.IsAny<int>()] = It.IsAny<string>());

foo.Object[18] = "foo";
}
//[Fact(Skip = "Not supported for now")]
//public void ShouldSetIndexerWithIndexMatcher()
//{
// var foo = new Mock<IIndexedFoo>(MockBehavior.Strict);
//
// foo.SetupSet(f => f[It.IsAny<int>()] = "foo");
//
// foo.Object[18] = "foo";
//}

//[Fact(Skip = "Not supported for now")]
//public void ShouldSetIndexerWithBothMatcher()
//{
// var foo = new Mock<IIndexedFoo>(MockBehavior.Strict);
//
// foo.SetupSet(f => f[It.IsAny<int>()] = It.IsAny<string>());
//
// foo.Object[18] = "foo";
//}
}
}

0 comments on commit e51453e

Please sign in to comment.