public void CreateWithNonMockRequestReturnsCorrectResult(object request)
 {
     // Fixture setup
     var dummyBuilder = MockRepository.GenerateMock<ISpecimenBuilder>();
     var sut = new RhinoMockAroundAdvice(dummyBuilder);
     // Exercise system
     var dummyContext = MockRepository.GenerateMock<ISpecimenContext>();
     var result = sut.Create(request, dummyContext);
     // Verify outcome
     var expectedResult = new NoSpecimen(request);
     Assert.Equal(expectedResult, result);
     // Teardown
 }
        public void CreateWithNonMockRequestReturnsCorrectResult(object request)
        {
            // Arrange
            var dummyBuilder = MockRepository.GenerateMock <ISpecimenBuilder>();
            var sut          = new RhinoMockAroundAdvice(dummyBuilder);
            // Act
            var dummyContext = MockRepository.GenerateMock <ISpecimenContext>();
            var result       = sut.Create(request, dummyContext);
            // Assert
            var expectedResult = new NoSpecimen();

            Assert.Equal(expectedResult, result);
        }
Пример #3
0
        public void CreateWithNonMockRequestReturnsCorrectResult(object request)
        {
            // Fixture setup
            var dummyBuilder = MockRepository.GenerateMock <ISpecimenBuilder>();
            var sut          = new RhinoMockAroundAdvice(dummyBuilder);
            // Exercise system
            var dummyContext = MockRepository.GenerateMock <ISpecimenContext>();
            var result       = sut.Create(request, dummyContext);
            // Verify outcome
            var expectedResult = new NoSpecimen(request);

            Assert.Equal(expectedResult, result);
            // Teardown
        }