public void TestCreatesDomainOwnedByGivenOrganizationDeprecatedResponse()
        {
            string json = @"{
  ""metadata"": {
    ""guid"": ""ec4741e3-3288-4046-810d-d8f72144e558"",
    ""url"": ""/v2/domains/ec4741e3-3288-4046-810d-d8f72144e558"",
    ""created_at"": ""2015-04-16T12:04:24+00:00"",
    ""updated_at"": null
  },
  ""entity"": {
    ""name"": ""exmaple.com"",
    ""owning_organization_guid"": ""04638947-e98f-413d-b6a9-64259b0c43b0"",
    ""owning_organization_url"": ""/v2/organizations/04638947-e98f-413d-b6a9-64259b0c43b0"",
    ""spaces_url"": ""/v2/domains/ec4741e3-3288-4046-810d-d8f72144e558/spaces""
  }
}";

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

            Assert.AreEqual("ec4741e3-3288-4046-810d-d8f72144e558", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true);
            Assert.AreEqual("/v2/domains/ec4741e3-3288-4046-810d-d8f72144e558", TestUtil.ToTestableString(obj.EntityMetadata.Url), true);
            Assert.AreEqual("2015-04-16T12:04:24+00:00", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true);
            Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true);
            Assert.AreEqual("exmaple.com", TestUtil.ToTestableString(obj.Name), true);
            Assert.AreEqual("04638947-e98f-413d-b6a9-64259b0c43b0", TestUtil.ToTestableString(obj.OwningOrganizationGuid), true);
            Assert.AreEqual("/v2/organizations/04638947-e98f-413d-b6a9-64259b0c43b0", TestUtil.ToTestableString(obj.OwningOrganizationUrl), true);
            Assert.AreEqual("/v2/domains/ec4741e3-3288-4046-810d-d8f72144e558/spaces", TestUtil.ToTestableString(obj.SpacesUrl), true);
        }
Beispiel #2
0
        public void TestCreatesDomainOwnedByGivenOrganizationDeprecatedResponse()
        {
            string json = @"{
  ""metadata"": {
    ""guid"": ""9b9cc2ef-119b-42fc-a567-1614a4e1ff28"",
    ""url"": ""/v2/domains/9b9cc2ef-119b-42fc-a567-1614a4e1ff28"",
    ""created_at"": ""2016-02-09T10:21:54Z"",
    ""updated_at"": null
  },
  ""entity"": {
    ""name"": ""exmaple.com"",
    ""owning_organization_guid"": ""ef15b821-73b3-444c-a506-329f9560eb64"",
    ""shared_organizations"": [

    ],
    ""owning_organization_url"": ""/v2/organizations/ef15b821-73b3-444c-a506-329f9560eb64"",
    ""spaces_url"": ""/v2/domains/9b9cc2ef-119b-42fc-a567-1614a4e1ff28/spaces""
  }
}";

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

            Assert.AreEqual("9b9cc2ef-119b-42fc-a567-1614a4e1ff28", TestUtil.ToTestableString(obj.EntityMetadata.Guid), true);
            Assert.AreEqual("/v2/domains/9b9cc2ef-119b-42fc-a567-1614a4e1ff28", TestUtil.ToTestableString(obj.EntityMetadata.Url), true);
            Assert.AreEqual("2016-02-09T10:21:54Z", TestUtil.ToTestableString(obj.EntityMetadata.CreatedAt), true);
            Assert.AreEqual("", TestUtil.ToTestableString(obj.EntityMetadata.UpdatedAt), true);
            Assert.AreEqual("exmaple.com", TestUtil.ToTestableString(obj.Name), true);
            Assert.AreEqual("ef15b821-73b3-444c-a506-329f9560eb64", TestUtil.ToTestableString(obj.OwningOrganizationGuid), true);
            Assert.AreEqual("/v2/organizations/ef15b821-73b3-444c-a506-329f9560eb64", TestUtil.ToTestableString(obj.OwningOrganizationUrl), true);
            Assert.AreEqual("/v2/domains/9b9cc2ef-119b-42fc-a567-1614a4e1ff28/spaces", TestUtil.ToTestableString(obj.SpacesUrl), true);
        }