public void TestCreateOrganizationQuotaDefinitionResponse() { string json = @"{ ""metadata"": { ""guid"": ""ec4675be-b38b-434b-91c4-c492bd1ce27f"", ""url"": ""/v2/quota_definitions/ec4675be-b38b-434b-91c4-c492bd1ce27f"", ""created_at"": ""2015-04-16T12:04:19+00:00"", ""updated_at"": null }, ""entity"": { ""name"": ""gold_quota"", ""non_basic_services_allowed"": true, ""total_services"": 5, ""total_routes"": 10, ""memory_limit"": 5120, ""trial_db_allowed"": false, ""instance_memory_limit"": 10240 } }"; CreateOrganizationQuotaDefinitionResponse obj = Utilities.DeserializeJson <CreateOrganizationQuotaDefinitionResponse>(json); Assert.AreEqual("ec4675be-b38b-434b-91c4-c492bd1ce27f", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/quota_definitions/ec4675be-b38b-434b-91c4-c492bd1ce27f", TestUtil.ToTestableString(obj.EntityMetadata.Url), true); Assert.AreEqual("2015-04-16T12:04:19+00:00", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true); Assert.AreEqual("gold_quota", TestUtil.ToTestableString(obj.Name), true); Assert.AreEqual("true", TestUtil.ToTestableString(obj.NonBasicServicesAllowed), true); Assert.AreEqual("5", TestUtil.ToTestableString(obj.TotalServices), true); Assert.AreEqual("10", TestUtil.ToTestableString(obj.TotalRoutes), true); Assert.AreEqual("5120", TestUtil.ToTestableString(obj.MemoryLimit), true); Assert.AreEqual("false", TestUtil.ToTestableString(obj.TrialDbAllowed), true); Assert.AreEqual("10240", TestUtil.ToTestableString(obj.InstanceMemoryLimit), true); }
public void TestCreateOrganizationQuotaDefinitionResponse() { string json = @"{ ""metadata"": { ""guid"": ""c4113c7c-3f18-4191-b04f-15a6d78463f9"", ""url"": ""/v2/quota_definitions/c4113c7c-3f18-4191-b04f-15a6d78463f9"", ""created_at"": ""2016-02-09T10:21:43Z"", ""updated_at"": null }, ""entity"": { ""name"": ""gold_quota"", ""non_basic_services_allowed"": true, ""total_services"": 5, ""total_routes"": 10, ""memory_limit"": 5120, ""trial_db_allowed"": false, ""instance_memory_limit"": 10240 } }"; CreateOrganizationQuotaDefinitionResponse obj = Utilities.DeserializeJson <CreateOrganizationQuotaDefinitionResponse>(json); Assert.AreEqual("c4113c7c-3f18-4191-b04f-15a6d78463f9", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/quota_definitions/c4113c7c-3f18-4191-b04f-15a6d78463f9", TestUtil.ToTestableString(obj.EntityMetadata.Url), true); Assert.AreEqual("2016-02-09T10:21:43Z", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true); Assert.AreEqual("gold_quota", TestUtil.ToTestableString(obj.Name), true); Assert.AreEqual("true", TestUtil.ToTestableString(obj.NonBasicServicesAllowed), true); Assert.AreEqual("5", TestUtil.ToTestableString(obj.TotalServices), true); Assert.AreEqual("10", TestUtil.ToTestableString(obj.TotalRoutes), true); Assert.AreEqual("5120", TestUtil.ToTestableString(obj.MemoryLimit), true); Assert.AreEqual("false", TestUtil.ToTestableString(obj.TrialDbAllowed), true); Assert.AreEqual("10240", TestUtil.ToTestableString(obj.InstanceMemoryLimit), true); }
public void TestCreateOrganizationQuotaDefinitionResponse() { string json = @"{ ""metadata"": { ""guid"": ""f7a175f9-42d9-49b6-a3bd-a2fe2edd03a2"", ""url"": ""/v2/quota_definitions/a57b9c76-fdf5-4efd-8cec-90f3a6c82aba"", ""created_at"": ""2016-09-02T11:52:30Z"", ""updated_at"": null }, ""entity"": { ""name"": ""gold_quota"", ""non_basic_services_allowed"": true, ""total_services"": -1, ""total_routes"": 4, ""total_private_domains"": -1, ""memory_limit"": 5120, ""trial_db_allowed"": false, ""instance_memory_limit"": 10240, ""app_instance_limit"": 10, ""app_task_limit"": 5, ""total_service_keys"": -1, ""total_reserved_route_ports"": 3 } }"; CreateOrganizationQuotaDefinitionResponse obj = Utilities.DeserializeJson <CreateOrganizationQuotaDefinitionResponse>(json); Assert.AreEqual("f7a175f9-42d9-49b6-a3bd-a2fe2edd03a2", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true); Assert.AreEqual("/v2/quota_definitions/a57b9c76-fdf5-4efd-8cec-90f3a6c82aba", TestUtil.ToTestableString(obj.EntityMetadata.Url), true); Assert.AreEqual("2016-09-02T11:52:30Z", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true); Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true); Assert.AreEqual("gold_quota", TestUtil.ToTestableString(obj.Name), true); Assert.AreEqual("true", TestUtil.ToTestableString(obj.NonBasicServicesAllowed), true); Assert.AreEqual("-1", TestUtil.ToTestableString(obj.TotalServices), true); Assert.AreEqual("4", TestUtil.ToTestableString(obj.TotalRoutes), true); Assert.AreEqual("-1", TestUtil.ToTestableString(obj.TotalPrivateDomains), true); Assert.AreEqual("5120", TestUtil.ToTestableString(obj.MemoryLimit), true); Assert.AreEqual("false", TestUtil.ToTestableString(obj.TrialDbAllowed), true); Assert.AreEqual("10240", TestUtil.ToTestableString(obj.InstanceMemoryLimit), true); Assert.AreEqual("10", TestUtil.ToTestableString(obj.AppInstanceLimit), true); Assert.AreEqual("5", TestUtil.ToTestableString(obj.AppTaskLimit), true); Assert.AreEqual("-1", TestUtil.ToTestableString(obj.TotalServiceKeys), true); Assert.AreEqual("3", TestUtil.ToTestableString(obj.TotalReservedRoutePorts), true); }