/// <summary> /// Determines the correct oepration. /// If the value token after a distinct operator, is null the correct /// operation is IsNotNull /// </summary> /// <param name="field">The field.</param> /// <returns>The operation</returns> private Operation IsNotNullOrNotEqualRule(FieldNode field) { ValueNode valueNode = ValueRule(); // TODO: Introduce a class for Null Values if (valueNode == null) { return(_astFactory.CreateComparationIsNotNull(field)); } return(_astFactory.CreateComparationNotEqual(field, valueNode)); }
public void CreateOperationIsNotNul() { Operation operation = factory.CreateComparationIsNotNull( factory.CreateFieldNode("Field")); Assert.IsNotNull(operation); Assert.AreEqual(typeof(OpIsNotNull), operation.GetType()); }