summaryrefslogtreecommitdiff
path: root/java/test/Ice/operations/Twoways.java
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-08-27 08:59:34 +0000
committerMichi Henning <michi@zeroc.com>2003-08-27 08:59:34 +0000
commit3e55486ea753901101bed6974e872d0002c8aaed (patch)
treea615409a0cf6472a00162709cd007ff045b690c8 /java/test/Ice/operations/Twoways.java
parentAdded test for ice_getContext(). (diff)
downloadice-3e55486ea753901101bed6974e872d0002c8aaed.tar.bz2
ice-3e55486ea753901101bed6974e872d0002c8aaed.tar.xz
ice-3e55486ea753901101bed6974e872d0002c8aaed.zip
Added per-proxy contexts to icej. For ice, added context to operator== and
the hash function for proxies.
Diffstat (limited to 'java/test/Ice/operations/Twoways.java')
-rw-r--r--java/test/Ice/operations/Twoways.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/java/test/Ice/operations/Twoways.java b/java/test/Ice/operations/Twoways.java
index 6606b9351d3..d18e5b23c0d 100644
--- a/java/test/Ice/operations/Twoways.java
+++ b/java/test/Ice/operations/Twoways.java
@@ -526,5 +526,30 @@ class Twoways
}
}
}
+
+ {
+ java.util.HashMap ctx = new java.util.HashMap();
+ ctx.put("one", "ONE");
+ ctx.put("two", "TWO");
+ ctx.put("three", "THREE");
+ {
+ test(p.ice_getContext().isEmpty());
+ java.util.Map r = p.opContext();
+ test(!r.equals(ctx));
+ }
+ {
+ java.util.Map r = p.opContext(ctx);
+ test(p.ice_getContext().isEmpty());
+ test(r.equals(ctx));
+ }
+ {
+ Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_newContext(ctx));
+ test(p2.ice_getContext().equals(ctx));
+ java.util.Map r = p2.opContext();
+ test(r.equals(ctx));
+ r = p2.opContext(ctx);
+ test(r.equals(ctx));
+ }
+ }
}
}