コード例 #1
0
        public void WithReturnsCorrectResult()
        {
            // Arrange
            var sut = new NullComposer <PropertyHolder <object> >();
            // Act
            var result = sut.With(x => x.Property, new object());

            // Assert
            Assert.Same(sut, result);
        }
コード例 #2
0
        public void WithSingleArgValueFactoryReturnsCorrectResult()
        {
            // Arrange
            var sut = new NullComposer <PropertyHolder <object> >();
            // Act
            var result = sut.With(x => x.Property, (object obj) => obj);

            // Assert
            Assert.Same(sut, result);
        }
コード例 #3
0
        public void WithReturnsCorrectResult()
        {
            // Fixture setup
            var sut = new NullComposer <PropertyHolder <object> >();
            // Exercise system
            var result = sut.With(x => x.Property, new object());

            // Verify outcome
            Assert.Same(sut, result);
            // Teardown
        }
コード例 #4
0
 public void WithReturnsCorrectResult()
 {
     // Fixture setup
     var sut = new NullComposer<PropertyHolder<object>>();
     // Exercise system
     var result = sut.With(x => x.Property, new object());
     // Verify outcome
     Assert.Same(sut, result);
     // Teardown
 }