コード例 #1
0
        public void IsSatisfiedByNullThrows()
        {
            // Arrange
            var sut = new NoConstructorsSpecification();

            // Act & assert
            Assert.Throws <ArgumentNullException>(() => sut.IsSatisfiedBy(null));
        }
コード例 #2
0
        public void IsSatisfiedByNullThrows()
        {
            // Fixture setup
            var sut = new NoConstructorsSpecification();

            // Exercise system and verify outcome
            Assert.Throws <ArgumentNullException>(() => sut.IsSatisfiedBy(null));
            // Teardown
        }
コード例 #3
0
        public void IsSatisfiedByReturnsCorrectResult(object request, bool expectedResult)
        {
            // Arrange
            var sut = new NoConstructorsSpecification();
            // Act
            var result = sut.IsSatisfiedBy(request);

            // Assert
            Assert.Equal(expectedResult, result);
        }
コード例 #4
0
        public void IsSatisfiedByReturnsCorrectResult(object request, bool expectedResult)
        {
            // Fixture setup
            var sut = new NoConstructorsSpecification();
            // Exercise system
            var result = sut.IsSatisfiedBy(request);

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