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); }
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>(); }
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>(); }
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 ); }