public void TestUpdateUserProvidedServiceInstanceResponse() { string json = @"{ ""metadata"": { ""guid"": ""b525c08b-c603-4ad0-b15b-c288da3a7920"", ""url"": ""/v2/user_provided_service_instances/b525c08b-c603-4ad0-b15b-c288da3a7920"", ""created_at"": ""2015-04-16T12:04:23+00:00"", ""updated_at"": ""2015-04-16T12:04:23+00:00"" }, ""entity"": { ""name"": ""name-464"", ""credentials"": { ""somekey"": ""somenewvalue"" }, ""space_guid"": ""7ee7af3a-3176-4721-aae3-3681b2f4f591"", ""type"": ""user_provided_service_instance"", ""syslog_drain_url"": ""https://foo.com/url-45"", ""space_url"": ""/v2/spaces/7ee7af3a-3176-4721-aae3-3681b2f4f591"", ""service_bindings_url"": ""/v2/user_provided_service_instances/b525c08b-c603-4ad0-b15b-c288da3a7920/service_bindings"" } }"; UpdateUserProvidedServiceInstanceResponse obj = Utilities.DeserializeJson <UpdateUserProvidedServiceInstanceResponse>(json); Assert.AreEqual("b525c08b-c603-4ad0-b15b-c288da3a7920", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/user_provided_service_instances/b525c08b-c603-4ad0-b15b-c288da3a7920", TestUtil.ToTestableString(obj.EntityMetadata.Url), true); Assert.AreEqual("2015-04-16T12:04:23+00:00", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true); Assert.AreEqual("2015-04-16T12:04:23+00:00", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true); Assert.AreEqual("name-464", TestUtil.ToTestableString(obj.Name), true); Assert.AreEqual("7ee7af3a-3176-4721-aae3-3681b2f4f591", TestUtil.ToTestableString(obj.SpaceGuid), true); Assert.AreEqual("user_provided_service_instance", TestUtil.ToTestableString(obj.Type), true); Assert.AreEqual("https://foo.com/url-45", TestUtil.ToTestableString(obj.SyslogDrainUrl), true); Assert.AreEqual("/v2/spaces/7ee7af3a-3176-4721-aae3-3681b2f4f591", TestUtil.ToTestableString(obj.SpaceUrl), true); Assert.AreEqual("/v2/user_provided_service_instances/b525c08b-c603-4ad0-b15b-c288da3a7920/service_bindings", TestUtil.ToTestableString(obj.ServiceBindingsUrl), true); }
public void TestUpdateUserProvidedServiceInstanceResponse() { string json = @"{ ""metadata"": { ""guid"": ""37e86183-576c-4b50-8c74-d7281baccb5c"", ""url"": ""/v2/user_provided_service_instances/37e86183-576c-4b50-8c74-d7281baccb5c"", ""created_at"": ""2016-02-09T10:21:54Z"", ""updated_at"": ""2016-02-09T10:21:54Z"" }, ""entity"": { ""name"": ""name-1894"", ""credentials"": { ""somekey"": ""somenewvalue"" }, ""space_guid"": ""ff32b563-8bc1-4490-a2c3-826fa9d8686d"", ""type"": ""user_provided_service_instance"", ""syslog_drain_url"": ""https://foo.com/url-76"", ""space_url"": ""/v2/spaces/ff32b563-8bc1-4490-a2c3-826fa9d8686d"", ""service_bindings_url"": ""/v2/user_provided_service_instances/37e86183-576c-4b50-8c74-d7281baccb5c/service_bindings"" } }"; UpdateUserProvidedServiceInstanceResponse obj = Utilities.DeserializeJson <UpdateUserProvidedServiceInstanceResponse>(json); Assert.AreEqual("37e86183-576c-4b50-8c74-d7281baccb5c", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/user_provided_service_instances/37e86183-576c-4b50-8c74-d7281baccb5c", TestUtil.ToTestableString(obj.EntityMetadata.Url), true); Assert.AreEqual("2016-02-09T10:21:54Z", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true); Assert.AreEqual("2016-02-09T10:21:54Z", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true); Assert.AreEqual("name-1894", TestUtil.ToTestableString(obj.Name), true); Assert.AreEqual("ff32b563-8bc1-4490-a2c3-826fa9d8686d", TestUtil.ToTestableString(obj.SpaceGuid), true); Assert.AreEqual("user_provided_service_instance", TestUtil.ToTestableString(obj.Type), true); Assert.AreEqual("https://foo.com/url-76", TestUtil.ToTestableString(obj.SyslogDrainUrl), true); Assert.AreEqual("/v2/spaces/ff32b563-8bc1-4490-a2c3-826fa9d8686d", TestUtil.ToTestableString(obj.SpaceUrl), true); Assert.AreEqual("/v2/user_provided_service_instances/37e86183-576c-4b50-8c74-d7281baccb5c/service_bindings", TestUtil.ToTestableString(obj.ServiceBindingsUrl), true); }
public void TestUpdateUserProvidedServiceInstanceResponse() { string json = @"{ ""metadata"": { ""guid"": ""2e9c313a-9d09-4687-9ede-c468b220e915"", ""url"": ""/v2/user_provided_service_instances/aa02f808-21f7-496e-9493-9e4539fadd39"", ""created_at"": ""2016-09-02T11:52:23Z"", ""updated_at"": ""2016-09-02T11:52:23Z"" }, ""entity"": { ""name"": ""name-2223"", ""credentials"": { ""somekey"": ""somenewvalue"" }, ""space_guid"": ""2e9c313a-9d09-4687-9ede-c468b220e915"", ""type"": ""user_provided_service_instance"", ""syslog_drain_url"": ""https://foo.com/url-93"", ""route_service_url"": null, ""space_url"": ""/v2/spaces/68999fc4-b2fa-4468-bd3f-86e26f2c3223"", ""service_bindings_url"": ""/v2/user_provided_service_instances/aa02f808-21f7-496e-9493-9e4539fadd39/service_bindings"", ""routes_url"": ""/v2/user_provided_service_instances/aa02f808-21f7-496e-9493-9e4539fadd39/routes"" } }"; UpdateUserProvidedServiceInstanceResponse obj = Utilities.DeserializeJson <UpdateUserProvidedServiceInstanceResponse>(json); Assert.AreEqual("2e9c313a-9d09-4687-9ede-c468b220e915", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/user_provided_service_instances/aa02f808-21f7-496e-9493-9e4539fadd39", TestUtil.ToTestableString(obj.EntityMetadata.Url), true); Assert.AreEqual("2016-09-02T11:52:23Z", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true); Assert.AreEqual("2016-09-02T11:52:23Z", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true); Assert.AreEqual("name-2223", TestUtil.ToTestableString(obj.Name), true); Assert.AreEqual("2e9c313a-9d09-4687-9ede-c468b220e915", TestUtil.ToTestableString(obj.SpaceGuid), true); Assert.AreEqual("user_provided_service_instance", TestUtil.ToTestableString(obj.Type), true); Assert.AreEqual("https://foo.com/url-93", TestUtil.ToTestableString(obj.SyslogDrainUrl), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.RouteServiceUrl), true); Assert.AreEqual("/v2/spaces/68999fc4-b2fa-4468-bd3f-86e26f2c3223", TestUtil.ToTestableString(obj.SpaceUrl), true); Assert.AreEqual("/v2/user_provided_service_instances/aa02f808-21f7-496e-9493-9e4539fadd39/service_bindings", TestUtil.ToTestableString(obj.ServiceBindingsUrl), true); Assert.AreEqual("/v2/user_provided_service_instances/aa02f808-21f7-496e-9493-9e4539fadd39/routes", TestUtil.ToTestableString(obj.RoutesUrl), true); }