private static void TestRestStopUpdate(ResourceVerification verification, string httpMethod, string preferHeader, bool useBatch, DSPMetadata roadTripMetadata) { var restStop = SpatialTestUtil.CreateRestStopResource( roadTripMetadata, verification.Id, verification.PropertyValues.RestStopGeography, useComplexType: false, modifyPropertyValues: null); ExecuteUpdate(restStop, verification.Id, verification.Request, httpMethod, preferHeader, useBatch, verification.PayloadFormat); // Verify that the operation was successful by querying the same data again verification.GetAndVerifyRestStop(); }
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 TestRestStopUpdate(ResourceVerification verification, string httpMethod, string preferHeader, bool useBatch, DSPMetadata roadTripMetadata) { var restStop = SpatialTestUtil.CreateRestStopResource( roadTripMetadata, verification.Id, verification.PropertyValues.RestStopGeography, useComplexType: false, modifyPropertyValues: null); ExecuteUpdate(restStop, verification.Id, verification.Request, httpMethod, preferHeader, useBatch, verification.PayloadFormat); // Verify that the operation was successful by querying the same data again verification.GetAndVerifyRestStop(); }