Exemple #1
0
        public void TestCreateServicePlanVisibilityResponse()
        {
            string json = @"{
  ""metadata"": {
    ""guid"": ""cedb1495-8e10-4d95-af08-de6f50e4c89a"",
    ""url"": ""/v2/service_plan_visibilities/cedb1495-8e10-4d95-af08-de6f50e4c89a"",
    ""created_at"": ""2016-02-09T10:21:53Z"",
    ""updated_at"": null
  },
  ""entity"": {
    ""service_plan_guid"": ""3f0c3f84-ed58-485e-ad2c-6702241de1ed"",
    ""organization_guid"": ""b9a0eecd-f62f-4efd-8a1e-0357a60d290b"",
    ""service_plan_url"": ""/v2/service_plans/3f0c3f84-ed58-485e-ad2c-6702241de1ed"",
    ""organization_url"": ""/v2/organizations/b9a0eecd-f62f-4efd-8a1e-0357a60d290b""
  }
}";

            CreateServicePlanVisibilityResponse obj = Utilities.DeserializeJson <CreateServicePlanVisibilityResponse>(json);

            Assert.AreEqual("cedb1495-8e10-4d95-af08-de6f50e4c89a", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true);
            Assert.AreEqual("/v2/service_plan_visibilities/cedb1495-8e10-4d95-af08-de6f50e4c89a", TestUtil.ToTestableString(obj.EntityMetadata.Url), true);
            Assert.AreEqual("2016-02-09T10:21:53Z", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true);
            Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true);
            Assert.AreEqual("3f0c3f84-ed58-485e-ad2c-6702241de1ed", TestUtil.ToTestableString(obj.ServicePlanGuid), true);
            Assert.AreEqual("b9a0eecd-f62f-4efd-8a1e-0357a60d290b", TestUtil.ToTestableString(obj.OrganizationGuid), true);
            Assert.AreEqual("/v2/service_plans/3f0c3f84-ed58-485e-ad2c-6702241de1ed", TestUtil.ToTestableString(obj.ServicePlanUrl), true);
            Assert.AreEqual("/v2/organizations/b9a0eecd-f62f-4efd-8a1e-0357a60d290b", TestUtil.ToTestableString(obj.OrganizationUrl), true);
        }
Exemple #2
0
        public void TestCreateServicePlanVisibilityResponse()
        {
            string json = @"{
  ""metadata"": {
    ""guid"": ""efa536a8-334b-4750-ba75-91958b2c469c"",
    ""url"": ""/v2/service_plan_visibilities/efa536a8-334b-4750-ba75-91958b2c469c"",
    ""created_at"": ""2015-04-16T12:04:22+00:00"",
    ""updated_at"": null
  },
  ""entity"": {
    ""service_plan_guid"": ""bdc11465-2a7b-49da-94b9-867ffdeecf02"",
    ""organization_guid"": ""cef3c47c-8cfe-4e34-8463-de01ad657e43"",
    ""service_plan_url"": ""/v2/service_plans/bdc11465-2a7b-49da-94b9-867ffdeecf02"",
    ""organization_url"": ""/v2/organizations/cef3c47c-8cfe-4e34-8463-de01ad657e43""
  }
}";

            CreateServicePlanVisibilityResponse obj = Utilities.DeserializeJson <CreateServicePlanVisibilityResponse>(json);

            Assert.AreEqual("efa536a8-334b-4750-ba75-91958b2c469c", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true);
            Assert.AreEqual("/v2/service_plan_visibilities/efa536a8-334b-4750-ba75-91958b2c469c", TestUtil.ToTestableString(obj.EntityMetadata.Url), true);
            Assert.AreEqual("2015-04-16T12:04:22+00:00", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true);
            Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true);
            Assert.AreEqual("bdc11465-2a7b-49da-94b9-867ffdeecf02", TestUtil.ToTestableString(obj.ServicePlanGuid), true);
            Assert.AreEqual("cef3c47c-8cfe-4e34-8463-de01ad657e43", TestUtil.ToTestableString(obj.OrganizationGuid), true);
            Assert.AreEqual("/v2/service_plans/bdc11465-2a7b-49da-94b9-867ffdeecf02", TestUtil.ToTestableString(obj.ServicePlanUrl), true);
            Assert.AreEqual("/v2/organizations/cef3c47c-8cfe-4e34-8463-de01ad657e43", TestUtil.ToTestableString(obj.OrganizationUrl), true);
        }
        public void TestCreateServicePlanVisibilityResponse()
        {
            string json = @"{
  ""metadata"": {
    ""guid"": ""18d64ecd-66ab-4f90-9e82-7a9654ac6df6"",
    ""url"": ""/v2/service_plan_visibilities/3650a05e-9554-4dc9-8a49-831f66fd58aa"",
    ""created_at"": ""2016-09-02T11:51:56Z"",
    ""updated_at"": null
  },
  ""entity"": {
    ""service_plan_guid"": ""18d64ecd-66ab-4f90-9e82-7a9654ac6df6"",
    ""organization_guid"": ""18d64ecd-66ab-4f90-9e82-7a9654ac6df6"",
    ""service_plan_url"": ""/v2/service_plans/4ad304fe-e98f-4731-9f94-4e05b93883fb"",
    ""organization_url"": ""/v2/organizations/62ac37bf-8386-40c0-8371-00e9c12ac888""
  }
}";

            CreateServicePlanVisibilityResponse obj = Utilities.DeserializeJson <CreateServicePlanVisibilityResponse>(json);

            Assert.AreEqual("18d64ecd-66ab-4f90-9e82-7a9654ac6df6", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true);
            Assert.AreEqual("/v2/service_plan_visibilities/3650a05e-9554-4dc9-8a49-831f66fd58aa", TestUtil.ToTestableString(obj.EntityMetadata.Url), true);
            Assert.AreEqual("2016-09-02T11:51:56Z", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true);
            Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true);
            Assert.AreEqual("18d64ecd-66ab-4f90-9e82-7a9654ac6df6", TestUtil.ToTestableString(obj.ServicePlanGuid), true);
            Assert.AreEqual("18d64ecd-66ab-4f90-9e82-7a9654ac6df6", TestUtil.ToTestableString(obj.OrganizationGuid), true);
            Assert.AreEqual("/v2/service_plans/4ad304fe-e98f-4731-9f94-4e05b93883fb", TestUtil.ToTestableString(obj.ServicePlanUrl), true);
            Assert.AreEqual("/v2/organizations/62ac37bf-8386-40c0-8371-00e9c12ac888", TestUtil.ToTestableString(obj.OrganizationUrl), true);
        }