protected void Latitude_ExpectParseResultToMatchNull() { // arrange ScalarType scalar = new LatitudeType(); object valueSyntax = null !; // act IValueNode result = scalar.ParseResult(valueSyntax); // assert Assert.Equal(typeof(NullValueNode), result.GetType()); }
protected void Latitude_ExpectParseResultToMatchDouble() { // arrange ScalarType scalar = new LatitudeType(); const double valueSyntax = 89d; // act IValueNode result = scalar.ParseResult(valueSyntax); // assert Assert.Equal(typeof(StringValueNode), result.GetType()); }
protected void Latitude_ExpectParseResultToThrowOnInvalidType() { // arrange ScalarType scalar = new LatitudeType(); const char valueSyntax = 'c'; // act Exception?result = Record.Exception(() => scalar.ParseResult(valueSyntax)); // assert Assert.IsType <SerializationException>(result); }
protected void Latitude_ExpectParseResultToThrowOnInvalidString() { // arrange ScalarType scalar = new LatitudeType(); var valueSyntax = "92° 0' 0.000\" S"; // act Exception?result = Record.Exception(() => scalar.ParseResult(valueSyntax)); // assert Assert.IsType <SerializationException>(result); }