public void OrTest4() { var left = new ExpressionSpecification <String>(x => false); var right = new ExpressionSpecification <String>(x => false); var target = new XOrSpecification <String>(left, right); var actual = target.Or(new ExpressionSpecification <String>(x => false)); var result = actual.IsSatisfiedBy(String.Empty); Assert.False(result); }
public void OrTestNullCheck() { 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.Or(other); Assert.Throws <ArgumentNullException>(test); }
public void OrTestCaseNullCheck() { 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.Or( other ); test.ShouldThrow<ArgumentNullException>(); }
public void OrTestCase4() { var left = new ExpressionSpecification<String>( x => false ); var right = new ExpressionSpecification<String>( x => false ); var target = new XOrSpecification<String>( left, right ); var actual = target.Or( new ExpressionSpecification<String>( x => false ) ); var result = actual.IsSatisfiedBy( String.Empty ); Assert.IsFalse( result ); }