protected void LocalCurrency_ExpectParseResultToMatchNull() { // arrange ScalarType scalar = new LocalCurrencyType(); // act IValueNode result = scalar.ParseResult(null); // assert Assert.Equal(typeof(NullValueNode), result.GetType()); }
protected void LocalCurrency_ExpectParseResultToThrowSerializationException() { // arrange ScalarType scalar = new LocalCurrencyType(); IValueNode runtimeValue = new IntValueNode(1); // act Exception?result = Record.Exception(() => scalar.ParseResult(runtimeValue)); // assert Assert.IsType <SerializationException>(result); }
protected void LocalCurrency_ExpectParseResultToMatchStringValue() { // arrange ScalarType scalar = new LocalCurrencyType(); const string valueSyntax = "$9.99"; // act IValueNode result = scalar.ParseResult(valueSyntax); // assert Assert.Equal(typeof(StringValueNode), result.GetType()); }