public void TestUpdateProcessResponse() { string json = @"{ ""guid"": ""451b9bf2-2826-4fc1-a2e3-938688a8e438"", ""type"": ""web"", ""command"": ""X"", ""instances"": 1, ""created_at"": ""2015-06-30T07:10:40Z"", ""updated_at"": ""2015-06-30T07:10:40Z"", ""_links"": { ""self"": { ""href"": ""/v3/processes/451b9bf2-2826-4fc1-a2e3-938688a8e438"" }, ""scale"": { ""href"": ""/v3/processes/451b9bf2-2826-4fc1-a2e3-938688a8e438/scale"", ""method"": ""PUT"" }, ""app"": { ""href"": ""/v3/apps/"" }, ""space"": { ""href"": ""/v2/spaces/bc6e3da0-2866-42a5-9edc-540a5a529f8f"" } } }"; UpdateProcessResponse obj = Utilities.DeserializeJson <UpdateProcessResponse>(json); Assert.AreEqual("451b9bf2-2826-4fc1-a2e3-938688a8e438", TestUtil.ToTestableString(obj.Guid), true); Assert.AreEqual("web", TestUtil.ToTestableString(obj.Type), true); Assert.AreEqual("X", TestUtil.ToTestableString(obj.Command), true); Assert.AreEqual("1", TestUtil.ToTestableString(obj.Instances), true); Assert.AreEqual("2015-06-30T07:10:40Z", TestUtil.ToTestableString(obj.CreatedAt), true); Assert.AreEqual("2015-06-30T07:10:40Z", TestUtil.ToTestableString(obj.UpdatedAt), true); }
public void TestUpdateProcessResponse() { string json = @"{ ""guid"": ""25e2f097-bf52-4718-83ca-5cbfec2bed17"", ""type"": ""web"", ""command"": ""X"", ""instances"": 1, ""memory_in_mb"": 1024, ""disk_in_mb"": 1024, ""created_at"": ""2016-07-07T09:17:15Z"", ""updated_at"": ""2016-07-07T09:17:15Z"", ""links"": { ""self"": { ""href"": ""/v3/processes/5ee885ae-b24d-4b57-a90b-827000fd34e1"" }, ""scale"": { ""href"": ""/v3/processes/5ee885ae-b24d-4b57-a90b-827000fd34e1/scale"", ""method"": ""PUT"" }, ""app"": { ""href"": ""/v3/apps/"" }, ""space"": { ""href"": ""/v2/spaces/d6c4f9a8-af31-4960-8ba8-53a059e0fca8"" } } }"; UpdateProcessResponse obj = Utilities.DeserializeJson <UpdateProcessResponse>(json); Assert.AreEqual("25e2f097-bf52-4718-83ca-5cbfec2bed17", TestUtil.ToTestableString(obj.Guid), true); Assert.AreEqual("web", TestUtil.ToTestableString(obj.Type), true); Assert.AreEqual("X", TestUtil.ToTestableString(obj.Command), true); Assert.AreEqual("1", TestUtil.ToTestableString(obj.Instances), true); Assert.AreEqual("1024", TestUtil.ToTestableString(obj.MemoryInMb), true); Assert.AreEqual("1024", TestUtil.ToTestableString(obj.DiskInMb), true); Assert.AreEqual("2016-07-07T09:17:15Z", TestUtil.ToTestableString(obj.CreatedAt), true); Assert.AreEqual("2016-07-07T09:17:15Z", TestUtil.ToTestableString(obj.UpdatedAt), true); }