public GeographyPropertyValues(ITestGeography tripLegGeography1, ITestGeography tripLegGeography2, ITestGeography amusementParkGeography, string amusementParkName, ITestGeography restStopGeography) { this.TripLegGeography1 = tripLegGeography1; this.TripLegGeography2 = tripLegGeography2; this.AmusementParkGeography = amusementParkGeography; this.AmusementParkName = amusementParkName; this.RestStopGeography = restStopGeography; }
private static void VerifyGeographyProperty(XElement properties, string propertyName, ITestGeography expectedValue) { XElement property = GetProperty(properties, propertyName); XAttribute typeAttribute = property.Attribute(UnitTestsUtil.MetadataNamespace + "type"); if (typeAttribute != null) { string actualType = property.Attribute(UnitTestsUtil.MetadataNamespace + "type").Value; string expectedtype = GetExpectedEdmShortQualifiedTypeName(expectedValue.AsGeography().GetType()); Assert.AreEqual(expectedtype, actualType, "Type on Geography property is incorrect"); } expectedValue.VerifyGmlContent(property); }
internal static DSPResource CreateRestStopResource(DSPMetadata roadTripMetadata, int id, ITestGeography location, bool useComplexType, Action<string, List<KeyValuePair<string, object>>> modifyPropertyValues) { List<KeyValuePair<string, object>> restStopPropertyValues = new List<KeyValuePair<string, object>>() { new KeyValuePair<string, object>("GeographyProperty", location.AsGeography()), }; if (modifyPropertyValues != null) { modifyPropertyValues("RestStop", restStopPropertyValues); } DSPResource restStopResource = CreateResource(roadTripMetadata, "RestStop", id, restStopPropertyValues.ToArray(), useComplexType); return restStopResource; }
internal static DSPResource CreateAmusementParkResource(DSPMetadata roadTripMetadata, int id, ITestGeography location, string name, bool useComplexType, Action<string, List<KeyValuePair<string, object>>> modifyPropertyValues) { List<KeyValuePair<string, object>> amusementParkPropertyValues = new List<KeyValuePair<string, object>>() { new KeyValuePair<string, object>("GeographyProperty", location.AsGeography()), new KeyValuePair<string, object>("Name", name), }; if (modifyPropertyValues != null) { modifyPropertyValues("AmusementPark", amusementParkPropertyValues); } DSPResource amusementParkResource = CreateResource(roadTripMetadata, "AmusementPark", id, amusementParkPropertyValues.ToArray(), useComplexType); return amusementParkResource; }
internal static DSPResource CreateTripLegResource(DSPMetadata roadTripMetadata, int id, ITestGeography geography1, ITestGeography geography2, bool useComplexType, Action<string, List<KeyValuePair<string, object>>> modifyPropertyValues) { List<KeyValuePair<string, object>> tripLegPropertyValues = new List<KeyValuePair<string, object>>() { new KeyValuePair<string, object>("GeographyProperty1", geography1.AsGeography()), new KeyValuePair<string, object>("GeographyProperty2", geography2.AsGeography()), }; if (modifyPropertyValues != null) { modifyPropertyValues("TripLeg", tripLegPropertyValues); } DSPResource tripLegResource = CreateResource(roadTripMetadata, "TripLeg", id, tripLegPropertyValues.ToArray(), useComplexType); return tripLegResource; }
internal static DSPResource CreateRestStopResource(DSPMetadata roadTripMetadata, int id, ITestGeography location, bool useComplexType, Action <string, List <KeyValuePair <string, object> > > modifyPropertyValues) { List <KeyValuePair <string, object> > restStopPropertyValues = new List <KeyValuePair <string, object> >() { new KeyValuePair <string, object>("GeographyProperty", location.AsGeography()), }; if (modifyPropertyValues != null) { modifyPropertyValues("RestStop", restStopPropertyValues); } DSPResource restStopResource = CreateResource(roadTripMetadata, "RestStop", id, restStopPropertyValues.ToArray(), useComplexType); return(restStopResource); }
internal static DSPResource CreateAmusementParkResource(DSPMetadata roadTripMetadata, int id, ITestGeography location, string name, bool useComplexType, Action <string, List <KeyValuePair <string, object> > > modifyPropertyValues) { List <KeyValuePair <string, object> > amusementParkPropertyValues = new List <KeyValuePair <string, object> >() { new KeyValuePair <string, object>("GeographyProperty", location.AsGeography()), new KeyValuePair <string, object>("Name", name), }; if (modifyPropertyValues != null) { modifyPropertyValues("AmusementPark", amusementParkPropertyValues); } DSPResource amusementParkResource = CreateResource(roadTripMetadata, "AmusementPark", id, amusementParkPropertyValues.ToArray(), useComplexType); return(amusementParkResource); }
internal static DSPResource CreateTripLegResource(DSPMetadata roadTripMetadata, int id, ITestGeography geography1, ITestGeography geography2, bool useComplexType, Action <string, List <KeyValuePair <string, object> > > modifyPropertyValues) { List <KeyValuePair <string, object> > tripLegPropertyValues = new List <KeyValuePair <string, object> >() { new KeyValuePair <string, object>("GeographyProperty1", geography1.AsGeography()), new KeyValuePair <string, object>("GeographyProperty2", geography2.AsGeography()), }; if (modifyPropertyValues != null) { modifyPropertyValues("TripLeg", tripLegPropertyValues); } DSPResource tripLegResource = CreateResource(roadTripMetadata, "TripLeg", id, tripLegPropertyValues.ToArray(), useComplexType); return(tripLegResource); }