public void ParseValue_Should_Pass_When_Value(string typeName) { // arrange INamedInputType type = CreateInputType(typeName); // act IValueNode literal = type.ParseValue(_geometry); // assert literal.ToString().MatchSnapshot(); }
public void ParseResult_Should_Pass_When_Serialized(string typeName) { // arrange INamedInputType type = CreateInputType(typeName); object? serialized = type.Serialize(_geometry); // act IValueNode literal = type.ParseResult(serialized); // assert literal.ToString().MatchSnapshot(); }
public void ParseValue_Should_Pass_When_Value(string typeName) { // arrange var inputFormatter = new InputFormatter(); INamedInputType type = CreateInputType(typeName); // act IValueNode literal = inputFormatter.FormatValue(_geometry, type); // assert literal.ToString().MatchSnapshot(); }
public void ParseValue_Should_Pass_When_Serialized(string typeName) { // arrange ILeafType type = CreateLeafType(typeName); var serialized = type.Serialize(_geometry); // act IValueNode literal = type.ParseValue(serialized); // assert literal.ToString().MatchSnapshot(); }
public static IError ArgumentValueIsNotCompatible( this IDocumentValidatorContext context, ArgumentNode node, IInputType locationType, IValueNode valueNode) { return(ErrorBuilder.New() .SetMessage(Resources.ErrorHelper_ArgumentValueIsNotCompatible) .AddLocation(valueNode) .SetPath(context.CreateErrorPath()) .SetExtension("argument", node.Name.Value) .SetExtension("argumentValue", valueNode.ToString()) .SetExtension("locationType", locationType.Print()) .SpecifiedBy("sec-Values-of-Correct-Type") .Build()); }
public override string ToString() { return($"Property: {property} = {value.ToString()}"); }