public void correct_decimal_value_for_decimal_value_is_returned() { var specifiers = new ReadOnlyDictionary <string, string>(new Dictionary <string, string> { { Specifier, "1.5" } }); var operand = new SimpleOperand(specifiers, Specifier); Assert.AreEqual((decimal)1.5, operand.GetDecimalValue().Result, "Decimal value returned by the operand is not correct"); }
public void wrong_specifier_on_get_decimal_value_fails() { var specifiers = new ReadOnlyDictionary <string, string>(new Dictionary <string, string> { { Specifier, "1.5" } }); var operand = new SimpleOperand(specifiers, "missing"); try { var x = operand.GetDecimalValue().Result; Assert.IsNotNull(x); } catch (AggregateException ex) { throw ex.InnerExceptions.First(); } }