public void BoolTrueEqualTest() { var equal = new NotEqual(new Bool(true), new Bool(true)); var result = (bool)equal.Execute(); Assert.Equal(false, result); }
public void BoolTrueAndFalseVarEqualTest() { var parameters = new ParameterCollection() { new Parameter("x", true), new Parameter("y", false) }; var equal = new NotEqual(new Variable("x"), new Variable("y")); var result = (bool)equal.Execute(parameters); Assert.Equal(true, result); }
public void NumberEqualTest() { var equal = new NotEqual(new Number(11), new Number(10)); var result = (bool)equal.Execute(); Assert.Equal(true, result); }
public void NumberVarEqualTest() { var parameters = new ParameterCollection() { new Parameter("x", 11), new Parameter("y", 10) }; var equal = new NotEqual(new Variable("x"), new Variable("y")); var result = (bool)equal.Execute(parameters); Assert.Equal(true, result); }
public void NumberAndBoolVarEqualTest() { var parameters = new ParameterCollection() { new Parameter("x", 10), new Parameter("y", false) }; var equal = new NotEqual(new Variable("x"), new Variable("y")); Assert.Throws<NotSupportedException>(() => (bool)equal.Execute(parameters)); }