Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Test]
- public void SomeOtherTest()
- {
- //Arrange
- var mock = new Mock<IFoo>();
- var sut = new SystemUnderTest(mock.Object); //never liked doing it this way...
- mock.Setup(m => x.Bar()).Returns("A whole bunch of ceremonial syntax..");
- //Act
- sut.DoSomething();
- //Assert
- mock.Verify(m => m.Baz()); //Baaaaah, more laaaaambdas
- }
- [Test]
- public void NSubTest()
- {
- var mock = Substitute.For<IFoo>();
- var sut = new SystemUnderTest(mock); //much nicer!
- mock.Bar().Returns("Look ma! No lambdas!");
- sut.DoSomething();
- mock.Received().Baz();
- }
Add Comment
Please, Sign In to add comment