예제 #1
0
        public void XOrTest4()
        {
            var left   = new ExpressionSpecification <String>(x => false);
            var right  = new ExpressionSpecification <String>(x => false);
            var target = new XOrSpecification <String>(left, right);

            var actual = target.XOr(new ExpressionSpecification <String>(x => false));
            var result = actual.IsSatisfiedBy(String.Empty);

            Assert.False(result);
        }
예제 #2
0
        public void XOrTestNullCheck()
        {
            var left   = new ExpressionSpecification <String>(x => false);
            var right  = new ExpressionSpecification <String>(x => false);
            var target = new XOrSpecification <String>(left, right);

            ExpressionSpecification <String> other = null;
            // ReSharper disable once AssignNullToNotNullAttribute
            Action test = () => target.XOr(other);

            test.ShouldThrow <ArgumentNullException>();
        }
예제 #3
0
        public void XOrTestCaseNullCheck()
        {
            var left = new ExpressionSpecification<String>( x => false );
            var right = new ExpressionSpecification<String>( x => false );
            var target = new XOrSpecification<String>( left, right );

            ExpressionSpecification<String> other = null;
            Action test = () => target.XOr( other );

            test.ShouldThrow<ArgumentNullException>();
        }
예제 #4
0
        public void XOrTestCase4()
        {
            var left = new ExpressionSpecification<String>( x => false );
            var right = new ExpressionSpecification<String>( x => false );
            var target = new XOrSpecification<String>( left, right );

            var actual = target.XOr( new ExpressionSpecification<String>( x => false ) );
            var result = actual.IsSatisfiedBy( String.Empty );
            Assert.IsFalse( result );
        }