private static void TestAmusementParkUpdate(ResourceVerification verification, string httpMethod, string preferHeader, bool useBatch, DSPMetadata roadTripMetadata) { var amusementPark = SpatialTestUtil.CreateAmusementParkResource( roadTripMetadata, verification.Id, verification.PropertyValues.AmusementParkGeography, verification.PropertyValues.AmusementParkName, useComplexType: false, modifyPropertyValues: null); ExecuteUpdate(amusementPark, verification.Id, verification.Request, httpMethod, preferHeader, useBatch, verification.PayloadFormat); // Verify that the operation was successful by querying the same data again verification.GetAndVerifyAmusementPark(); }
public void SerializeGeodeticPropertiesInResource() { var testCases = new[] { new { GeographyType = typeof(GeographyPoint), DefaultValues = TestPoint.DefaultValues }, new { GeographyType = typeof(GeographyLineString), DefaultValues = TestLineString.DefaultValues }, }; var responseFromats = new string[] { UnitTestsUtil.AtomFormat }; TestUtil.RunCombinations(testCases, responseFromats, (testCase, responseFormat) => { GeographyPropertyValues defaultValues = testCase.DefaultValues; DSPUnitTestServiceDefinition roadTripServiceDefinition = GetRoadTripServiceDefinition(testCase.GeographyType, defaultValues); using (TestWebRequest request = roadTripServiceDefinition.CreateForInProcess()) { request.StartService(); request.Accept = responseFormat; ResourceVerification verification = GetResourceVerification(responseFormat, SpatialTestUtil.DefaultId, defaultValues, request); // Geography property followed by another geography property verification.GetAndVerifyTripLeg(); // Geography property followed by another non-geography property verification.GetAndVerifyAmusementPark(); // Geography property at the end of the entry verification.GetAndVerifyRestStop(); } }); }
private static void TestAmusementParkUpdate(ResourceVerification verification, string httpMethod, string preferHeader, bool useBatch, DSPMetadata roadTripMetadata) { var amusementPark = SpatialTestUtil.CreateAmusementParkResource( roadTripMetadata, verification.Id, verification.PropertyValues.AmusementParkGeography, verification.PropertyValues.AmusementParkName, useComplexType: false, modifyPropertyValues: null); ExecuteUpdate(amusementPark, verification.Id, verification.Request, httpMethod, preferHeader, useBatch, verification.PayloadFormat); // Verify that the operation was successful by querying the same data again verification.GetAndVerifyAmusementPark(); }