예제 #1
0
 public void SutIsDisposable(OrderService sut)
 {
     // Fixture setup
     // Exercise system
     // Verify outcome
     Assert.IsAssignableFrom<IDisposable>(sut);
     // Teardown
 }
예제 #2
0
 public void RepositoryIsCorrect([Frozen]OrderRepository expectedRepository, OrderService sut)
 {
     // Fixture setup
     // Exercise system
     OrderRepository result = sut.Repository;
     // Verify outcome
     Assert.Equal(expectedRepository, result);
     // Teardown
 }
예제 #3
0
 public void DisposeWillDisposeRepository([Frozen]Mock<OrderRepository> repositoryMock, OrderService sut)
 {
     // Fixture setup
     repositoryMock.Protected().Setup("Dispose", true).Verifiable();
     // Exercise system
     sut.Dispose();
     // Verify outcome
     repositoryMock.Verify();
     // Teardown
 }