Repository: curator
Updated Branches:
  refs/heads/CURATOR-394 ee18fd55f -> 9ac224a38


for safety check all the fields


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/9ac224a3
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/9ac224a3
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/9ac224a3

Branch: refs/heads/CURATOR-394
Commit: 9ac224a3803c6d0ee4ed2081f36871e9d852f75c
Parents: ee18fd5
Author: randgalt <randg...@apache.org>
Authored: Fri Mar 24 20:04:30 2017 -0500
Committer: randgalt <randg...@apache.org>
Committed: Fri Mar 24 20:04:30 2017 -0500

----------------------------------------------------------------------
 .../curator/x/discovery/TestJsonInstanceSerializer.java | 12 +++++++++++-
 .../TestJsonInstanceSerializerCompatibility.java        | 11 +++++++++--
 2 files changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/9ac224a3/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestJsonInstanceSerializer.java
----------------------------------------------------------------------
diff --git 
a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestJsonInstanceSerializer.java
 
b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestJsonInstanceSerializer.java
index f17919d..4b6325d 100644
--- 
a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestJsonInstanceSerializer.java
+++ 
b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/TestJsonInstanceSerializer.java
@@ -166,7 +166,17 @@ public class TestJsonInstanceSerializer
        public String getVal() {
                return val;
        }
-       public void setVal(String val) {
+
+        public Payload()
+        {
+        }
+
+        public Payload(String val)
+        {
+            this.val = val;
+        }
+
+        public void setVal(String val) {
                this.val = val;
        }
        @Override

http://git-wip-us.apache.org/repos/asf/curator/blob/9ac224a3/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/details/TestJsonInstanceSerializerCompatibility.java
----------------------------------------------------------------------
diff --git 
a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/details/TestJsonInstanceSerializerCompatibility.java
 
b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/details/TestJsonInstanceSerializerCompatibility.java
index c612a1f..41674b2 100644
--- 
a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/details/TestJsonInstanceSerializerCompatibility.java
+++ 
b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/details/TestJsonInstanceSerializerCompatibility.java
@@ -61,8 +61,15 @@ public class TestJsonInstanceSerializerCompatibility
         
TestJsonInstanceSerializer.Payload.class.cast(rawServiceInstance.getPayload()); 
// just to verify that it's the correct type
         //noinspection unchecked
         OldServiceInstance<TestJsonInstanceSerializer.Payload> check = 
(OldServiceInstance<TestJsonInstanceSerializer.Payload>)rawServiceInstance;
-        Assert.assertEquals(check.getName(), "name");
-        Assert.assertEquals(check.getPayload(), new 
TestJsonInstanceSerializer.Payload("test"));
+        Assert.assertEquals(check.getName(), instance.getName());
+        Assert.assertEquals(check.getId(), instance.getId());
+        Assert.assertEquals(check.getAddress(), instance.getAddress());
+        Assert.assertEquals(check.getPort(), instance.getPort());
+        Assert.assertEquals(check.getSslPort(), instance.getSslPort());
+        Assert.assertEquals(check.getPayload(), instance.getPayload());
+        Assert.assertEquals(check.getRegistrationTimeUTC(), 
instance.getRegistrationTimeUTC());
+        Assert.assertEquals(check.getServiceType(), instance.getServiceType());
+        Assert.assertEquals(check.getUriSpec(), instance.getUriSpec());
     }
 
     @Test

Reply via email to