public void CanMapSimpleNullableTypes(Type type, string expectedParamType, string expectedFormat = "") { var mapper = new TypeMapper(); var inputParam = new InputParameter { Type = type }; var param = mapper.Map(inputParam); Assert.AreEqual(expectedParamType, param.type); Assert.AreEqual(expectedFormat, param.format); Assert.IsEmpty(mapper.Models); }
public Parameter Map(InputParameter param) { var mapping = Register(param.Type); return new Parameter { type = mapping.Type, format = mapping.Format, name = param.Name, required = param.IsRequired }; }