private static Polygon convertToPolygon(JsonPoly jsonPoly) { var poly = new Polygon() { inverted = jsonPoly.inverted, regions = convertRegions(jsonPoly.regions) }; return(poly); }
private void validateResult(Polygon result, JsonPoly validationData, string demoName, string operation) { var regions = validationData.regions; Assert.AreEqual(regions.Count, result.regions.Count, string.Format("C# conversion did not return the same number of regions in the '{0}' demo for the '{1}' operation", demoName, operation)); for (int i = 0; i < regions.Count; i++) { validateRegion(result.regions[i], regions[i], demoName, operation); } }