public void BoolTrueAndFalseEqualTest() { var equal = new Equal(new Bool(true), new Bool(false)); var result = (bool)equal.Execute(); Assert.Equal(false, result); }
public void NumberEqualTest() { var equal = new Equal(new Number(10), new Number(10)); var result = (bool)equal.Execute(); Assert.Equal(true, result); }
public void BoolTrueEqualTest() { var equal = new Equal(new Bool(true), new Bool(true)); var result = (bool)equal.Execute(); Assert.True(result); }
public void NumberAndBoolVarEqualTest() { var parameters = new ParameterCollection() { new Parameter("x", 10), new Parameter("y", false) }; var equal = new Equal(new Variable("x"), new Variable("y")); Assert.Throws <NotSupportedException>(() => (bool)equal.Execute(parameters)); }
public void BoolTrueVarEqualTest() { var parameters = new ParameterCollection() { new Parameter("x", true), new Parameter("y", true) }; var equal = new Equal(new Variable("x"), new Variable("y")); var result = (bool)equal.Execute(parameters); Assert.Equal(true, result); }
public void BoolTrueAndFalseVarEqualTest() { var parameters = new ParameterCollection() { new Parameter("x", true), new Parameter("y", false) }; var equal = new Equal(Variable.X, new Variable("y")); var result = (bool)equal.Execute(parameters); Assert.False(result); }
public void NumberVarEqualTest() { var parameters = new ParameterCollection() { new Parameter("x", 10), new Parameter("y", 10) }; var equal = new Equal(Variable.X, new Variable("y")); var result = (bool)equal.Execute(parameters); Assert.True(result); }
public void CalculateInvalidParametersTest() { var equal = new Equal(new ComplexNumber(3, 2), new ComplexNumber(3, 2)); Assert.Throws <ResultIsNotSupportedException>(() => equal.Execute()); }