public void TestUpdateServiceDeprecatedResponse() { string json = @"{ ""metadata"": { ""guid"": ""a6abf8b5-db40-4b5a-b1bc-25739e7c08bb"", ""url"": ""/v2/services/a6abf8b5-db40-4b5a-b1bc-25739e7c08bb"", ""created_at"": ""2015-04-16T12:04:16+00:00"", ""updated_at"": ""2015-04-16T12:04:16+00:00"" }, ""entity"": { ""label"": ""SomeMysqlService"", ""provider"": ""MySql Provider"", ""url"": ""http://myql.provider.com"", ""description"": ""Mysql stores things for you"", ""long_description"": null, ""version"": ""2.0"", ""info_url"": null, ""active"": true, ""bindable"": true, ""unique_id"": ""2c59b749-0763-494c-b0aa-c5749040be2d"", ""extra"": null, ""tags"": [ ], ""requires"": [ ], ""documentation_url"": null, ""service_broker_guid"": ""d9dc5ee3-f209-4e1b-bb50-edf7229e2479"", ""plan_updateable"": false, ""service_plans_url"": ""/v2/services/a6abf8b5-db40-4b5a-b1bc-25739e7c08bb/service_plans"" } }"; UpdateServiceDeprecatedResponse obj = Utilities.DeserializeJson <UpdateServiceDeprecatedResponse>(json); Assert.AreEqual("a6abf8b5-db40-4b5a-b1bc-25739e7c08bb", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/services/a6abf8b5-db40-4b5a-b1bc-25739e7c08bb", TestUtil.ToTestableString(obj.EntityMetadata.Url), true); Assert.AreEqual("2015-04-16T12:04:16+00:00", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true); Assert.AreEqual("2015-04-16T12:04:16+00:00", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true); Assert.AreEqual("SomeMysqlService", TestUtil.ToTestableString(obj.Label), true); Assert.AreEqual("MySql Provider", TestUtil.ToTestableString(obj.Provider), true); Assert.AreEqual("http://myql.provider.com", TestUtil.ToTestableString(obj.Url), true); Assert.AreEqual("Mysql stores things for you", TestUtil.ToTestableString(obj.Description), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.LongDescription), true); Assert.AreEqual("2.0", TestUtil.ToTestableString(obj.Version), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.InfoUrl), true); Assert.AreEqual("true", TestUtil.ToTestableString(obj.Active), true); Assert.AreEqual("true", TestUtil.ToTestableString(obj.Bindable), true); Assert.AreEqual("2c59b749-0763-494c-b0aa-c5749040be2d", TestUtil.ToTestableString(obj.UniqueId), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.Extra), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.DocumentationUrl), true); Assert.AreEqual("d9dc5ee3-f209-4e1b-bb50-edf7229e2479", TestUtil.ToTestableString(obj.ServiceBrokerGuid), true); Assert.AreEqual("false", TestUtil.ToTestableString(obj.PlanUpdateable), true); Assert.AreEqual("/v2/services/a6abf8b5-db40-4b5a-b1bc-25739e7c08bb/service_plans", TestUtil.ToTestableString(obj.ServicePlansUrl), true); }
public void TestUpdateServiceDeprecatedResponse() { string json = @"{ ""metadata"": { ""guid"": ""7c4a071d-3b2b-431d-93ca-a8decef2aac1"", ""url"": ""/v2/services/7c4a071d-3b2b-431d-93ca-a8decef2aac1"", ""created_at"": ""2016-02-09T10:21:54Z"", ""updated_at"": ""2016-02-09T10:21:54Z"" }, ""entity"": { ""label"": ""SomeMysqlService"", ""provider"": ""MySql Provider"", ""url"": ""http://myql.provider.com"", ""description"": ""Mysql stores things for you"", ""long_description"": null, ""version"": ""2.0"", ""info_url"": null, ""active"": true, ""bindable"": true, ""unique_id"": ""3eed8156-8432-4a1c-a4ca-afc5e15f589f"", ""extra"": null, ""tags"": [ ], ""requires"": [ ], ""documentation_url"": null, ""service_broker_guid"": ""e7a84f57-cd1f-4938-87b6-c385000927ee"", ""plan_updateable"": false, ""service_plans_url"": ""/v2/services/7c4a071d-3b2b-431d-93ca-a8decef2aac1/service_plans"" } }"; UpdateServiceDeprecatedResponse obj = Utilities.DeserializeJson <UpdateServiceDeprecatedResponse>(json); Assert.AreEqual("7c4a071d-3b2b-431d-93ca-a8decef2aac1", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/services/7c4a071d-3b2b-431d-93ca-a8decef2aac1", 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("SomeMysqlService", TestUtil.ToTestableString(obj.Label), true); Assert.AreEqual("MySql Provider", TestUtil.ToTestableString(obj.Provider), true); Assert.AreEqual("http://myql.provider.com", TestUtil.ToTestableString(obj.Url), true); Assert.AreEqual("Mysql stores things for you", TestUtil.ToTestableString(obj.Description), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.LongDescription), true); Assert.AreEqual("2.0", TestUtil.ToTestableString(obj.Version), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.InfoUrl), true); Assert.AreEqual("true", TestUtil.ToTestableString(obj.Active), true); Assert.AreEqual("true", TestUtil.ToTestableString(obj.Bindable), true); Assert.AreEqual("3eed8156-8432-4a1c-a4ca-afc5e15f589f", TestUtil.ToTestableString(obj.UniqueId), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.Extra), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.DocumentationUrl), true); Assert.AreEqual("e7a84f57-cd1f-4938-87b6-c385000927ee", TestUtil.ToTestableString(obj.ServiceBrokerGuid), true); Assert.AreEqual("false", TestUtil.ToTestableString(obj.PlanUpdateable), true); Assert.AreEqual("/v2/services/7c4a071d-3b2b-431d-93ca-a8decef2aac1/service_plans", TestUtil.ToTestableString(obj.ServicePlansUrl), true); }