public void RemoveNestedOperator() { var unaryOperator = new UnaryOperator(UnaryOperatorType.IsNull, "prop2"); CriteriaOperator groupOperator = new GroupOperator(new BinaryOperator("pro1", 1), unaryOperator); var binaryOperatorExtractor = new CriteriaOperatorExtractor(); binaryOperatorExtractor.Remove(ref groupOperator, unaryOperator.ToString()); Assert.AreEqual(new BinaryOperator("pro1", 1).ToString(), groupOperator.ToString()); }
public void RemoveRootOperator() { CriteriaOperator unaryOperator = new UnaryOperator(UnaryOperatorType.IsNull, "prop2"); var binaryOperatorExtractor = new CriteriaOperatorExtractor(); binaryOperatorExtractor.Remove(ref unaryOperator, unaryOperator.ToString()); Assert.IsNull(unaryOperator); }