public void OrTest3() { var left = new ExpressionSpecification <String>(x => false); var right = new ExpressionSpecification <String>(x => true); var target = new AndSpecification <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 => true); var target = new AndSpecification <String>(left, right); ExpressionSpecification <String> other = null; // ReSharper disable once AssignNullToNotNullAttribute Action test = () => target.Or(other); test.ShouldThrow <ArgumentNullException>(); }
public void OrTestCaseNullCheck() { var left = new ExpressionSpecification<String>( x => false ); var right = new ExpressionSpecification<String>( x => true ); var target = new AndSpecification<String>( left, right ); ExpressionSpecification<String> other = null; Action test = () => target.Or( other ); test.ShouldThrow<ArgumentNullException>(); }
public void OrTestCase3() { var left = new ExpressionSpecification<String>( x => false ); var right = new ExpressionSpecification<String>( x => true ); var target = new AndSpecification<String>( left, right ); var actual = target.Or( new ExpressionSpecification<String>( x => false ) ); var result = actual.IsSatisfiedBy( String.Empty ); Assert.IsFalse( result ); }