public void correct_int_value_for_int_is_returned() { var specifiers = new ReadOnlyDictionary <string, string>(new Dictionary <string, string> { { Specifier, "2" } }); var operand = new SimpleOperand(specifiers, Specifier); Assert.AreEqual(2, operand.GetIntValue().Result, "Int value returned by the operand is not correct"); }
public void get_int_value_for_decimal_value_fails() { var specifiers = new ReadOnlyDictionary <string, string>(new Dictionary <string, string> { { Specifier, "1.5" } }); var operand = new SimpleOperand(specifiers, Specifier); try { var x = operand.GetIntValue().Result; Assert.IsNotNull(x); } catch (AggregateException ex) { throw ex.InnerExceptions.First(); } }