summaryrefslogtreecommitdiff
path: root/js/test
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-07-27 19:30:37 -0400
committerBernard Normier <bernard@zeroc.com>2016-07-27 19:30:37 -0400
commit883edab4361e58957796f25d5fc55cfb41f0f6ea (patch)
treefc90adc372b66bf0becf4c0912794c64af250a29 /js/test
parentICE-7242 - Cross test updates (diff)
downloadice-883edab4361e58957796f25d5fc55cfb41f0f6ea.tar.bz2
ice-883edab4361e58957796f25d5fc55cfb41f0f6ea.tar.xz
ice-883edab4361e58957796f25d5fc55cfb41f0f6ea.zip
Deprecate Communicator::stringToIdentity and identityToString
Diffstat (limited to 'js/test')
-rw-r--r--js/test/Glacier2/router/Client.js6
-rw-r--r--js/test/Ice/exceptions/Client.js16
-rw-r--r--js/test/Ice/exceptionsBidir/Client.js4
-rw-r--r--js/test/Ice/facetsBidir/Client.js34
-rw-r--r--js/test/Ice/inheritanceBidir/Client.js2
-rw-r--r--js/test/Ice/operations/BatchOneways.js2
-rw-r--r--js/test/Ice/operations/Twoways.js6
-rw-r--r--js/test/Ice/operationsBidir/AMDMyDerivedClassI.js2
-rw-r--r--js/test/Ice/operationsBidir/Client.js4
-rw-r--r--js/test/Ice/operationsBidir/MyDerivedClassI.js2
-rw-r--r--js/test/Ice/optionalBidir/Client.js4
-rw-r--r--js/test/Ice/proxy/Client.js8
12 files changed, 46 insertions, 44 deletions
diff --git a/js/test/Glacier2/router/Client.js b/js/test/Glacier2/router/Client.js
index a7808d8b81c..384d108ff95 100644
--- a/js/test/Glacier2/router/Client.js
+++ b/js/test/Glacier2/router/Client.js
@@ -274,7 +274,7 @@
var context = new Ice.Context();
context.set("_fwd", "t");
var otherCategoryTwoway = CallbackPrx.uncheckedCast(
- twoway.ice_identity(communicator.stringToIdentity("c2/callback")));
+ twoway.ice_identity(Ice.stringToIdentity("c2/callback")));
return otherCategoryTwoway.initiateCallback(twowayR, context);
}
).then(
@@ -290,7 +290,7 @@
var context = new Ice.Context();
context.set("_fwd", "t");
var otherCategoryTwoway = CallbackPrx.uncheckedCast(
- twoway.ice_identity(communicator.stringToIdentity("c3/callback")));
+ twoway.ice_identity(Ice.stringToIdentity("c3/callback")));
return otherCategoryTwoway.initiateCallback(twowayR, context);
}
).then(
@@ -303,7 +303,7 @@
var context = new Ice.Context();
context.set("_fwd", "t");
var otherCategoryTwoway = CallbackPrx.uncheckedCast(
- twoway.ice_identity(communicator.stringToIdentity("_userid/callback")));
+ twoway.ice_identity(Ice.stringToIdentity("_userid/callback")));
return otherCategoryTwoway.initiateCallback(twowayR, context);
}
).then(
diff --git a/js/test/Ice/exceptions/Client.js b/js/test/Ice/exceptions/Client.js
index 50921c50d0f..7c54701e5b0 100644
--- a/js/test/Ice/exceptions/Client.js
+++ b/js/test/Ice/exceptions/Client.js
@@ -158,10 +158,10 @@
function(adapter)
{
var obj = new EmptyI();
- adapter.add(obj, communicator.stringToIdentity("x"));
+ adapter.add(obj, Ice.stringToIdentity("x"));
try
{
- adapter.add(obj, communicator.stringToIdentity("x"));
+ adapter.add(obj, Ice.stringToIdentity("x"));
test(false);
}
catch(ex)
@@ -170,7 +170,7 @@
}
try
{
- adapter.add(obj, communicator.stringToIdentity(""));
+ adapter.add(obj, Ice.stringToIdentity(""));
test(false);
}
catch(ex)
@@ -180,7 +180,7 @@
}
try
{
- adapter.add(null, communicator.stringToIdentity("x"));
+ adapter.add(null, Ice.stringToIdentity("x"));
test(false);
}
catch(ex)
@@ -188,10 +188,10 @@
test(ex instanceof Ice.IllegalServantException);
}
- adapter.remove(communicator.stringToIdentity("x"));
+ adapter.remove(Ice.stringToIdentity("x"));
try
{
- adapter.remove(communicator.stringToIdentity("x"));
+ adapter.remove(Ice.stringToIdentity("x"));
test(false);
}
catch(ex)
@@ -385,7 +385,7 @@
function()
{
out.write("catching object not exist exception... ");
- var id = communicator.stringToIdentity("does not exist");
+ var id = Ice.stringToIdentity("does not exist");
var thrower2 = Test.ThrowerPrx.uncheckedCast(thrower.ice_identity(id));
return thrower2.ice_ping();
}
@@ -394,7 +394,7 @@
function(ex)
{
test(ex instanceof Ice.ObjectNotExistException);
- test(ex.id.equals(communicator.stringToIdentity("does not exist")));
+ test(ex.id.equals(Ice.stringToIdentity("does not exist")));
out.writeLine("ok");
out.write("catching facet not exist exception... ");
var thrower2 = Test.ThrowerPrx.uncheckedCast(thrower, "no such facet");
diff --git a/js/test/Ice/exceptionsBidir/Client.js b/js/test/Ice/exceptionsBidir/Client.js
index 6196368f20e..a7482dd22a1 100644
--- a/js/test/Ice/exceptionsBidir/Client.js
+++ b/js/test/Ice/exceptionsBidir/Client.js
@@ -30,11 +30,11 @@
{
if(amd)
{
- adapter.add(new AMDThrowerI(), communicator.stringToIdentity("thrower"));
+ adapter.add(new AMDThrowerI(), Ice.stringToIdentity("thrower"));
}
else
{
- adapter.add(new ThrowerI(), communicator.stringToIdentity("thrower"));
+ adapter.add(new ThrowerI(), Ice.stringToIdentity("thrower"));
}
var base = communicator.stringToProxy("thrower:default -p 12010");
return base.ice_getConnection().then(
diff --git a/js/test/Ice/facetsBidir/Client.js b/js/test/Ice/facetsBidir/Client.js
index c8aa72d2a85..cadc1356968 100644
--- a/js/test/Ice/facetsBidir/Client.js
+++ b/js/test/Ice/facetsBidir/Client.js
@@ -50,21 +50,21 @@
function(adapter)
{
var obj = new EmptyI();
- adapter.add(obj, communicator.stringToIdentity("d"));
- adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD");
+ adapter.add(obj, Ice.stringToIdentity("d"));
+ adapter.addFacet(obj, Ice.stringToIdentity("d"), "facetABCD");
try
{
- adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD");
+ adapter.addFacet(obj, Ice.stringToIdentity("d"), "facetABCD");
test(false);
}
catch(ex)
{
test(ex instanceof Ice.AlreadyRegisteredException);
}
- adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD");
+ adapter.removeFacet(Ice.stringToIdentity("d"), "facetABCD");
try
{
- adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD");
+ adapter.removeFacet(Ice.stringToIdentity("d"), "facetABCD");
test(false);
}
catch(ex)
@@ -76,26 +76,26 @@
out.write("testing removeAllFacets... ");
var obj1 = new EmptyI();
var obj2 = new EmptyI();
- adapter.addFacet(obj1, communicator.stringToIdentity("id1"), "f1");
- adapter.addFacet(obj2, communicator.stringToIdentity("id1"), "f2");
+ adapter.addFacet(obj1, Ice.stringToIdentity("id1"), "f1");
+ adapter.addFacet(obj2, Ice.stringToIdentity("id1"), "f2");
var obj3 = new EmptyI();
- adapter.addFacet(obj1, communicator.stringToIdentity("id2"), "f1");
- adapter.addFacet(obj2, communicator.stringToIdentity("id2"), "f2");
- adapter.addFacet(obj3, communicator.stringToIdentity("id2"), "");
- var fm = adapter.removeAllFacets(communicator.stringToIdentity("id1"));
+ adapter.addFacet(obj1, Ice.stringToIdentity("id2"), "f1");
+ adapter.addFacet(obj2, Ice.stringToIdentity("id2"), "f2");
+ adapter.addFacet(obj3, Ice.stringToIdentity("id2"), "");
+ var fm = adapter.removeAllFacets(Ice.stringToIdentity("id1"));
test(fm.size === 2);
test(fm.get("f1") === obj1);
test(fm.get("f2") === obj2);
try
{
- adapter.removeAllFacets(communicator.stringToIdentity("id1"));
+ adapter.removeAllFacets(Ice.stringToIdentity("id1"));
test(false);
}
catch(ex)
{
test(ex instanceof Ice.NotRegisteredException);
}
- fm = adapter.removeAllFacets(communicator.stringToIdentity("id2"));
+ fm = adapter.removeAllFacets(Ice.stringToIdentity("id2"));
test(fm.size == 3);
test(fm.get("f1") === obj1);
test(fm.get("f2") === obj2);
@@ -113,12 +113,12 @@
function(adapter)
{
var di = new DI();
- adapter.add(di, communicator.stringToIdentity("d"));
- adapter.addFacet(di, communicator.stringToIdentity("d"), "facetABCD");
+ adapter.add(di, Ice.stringToIdentity("d"));
+ adapter.addFacet(di, Ice.stringToIdentity("d"), "facetABCD");
var fi = new FI();
- adapter.addFacet(fi, communicator.stringToIdentity("d"), "facetEF");
+ adapter.addFacet(fi, Ice.stringToIdentity("d"), "facetEF");
var hi = new HI();
- adapter.addFacet(hi, communicator.stringToIdentity("d"), "facetGH");
+ adapter.addFacet(hi, Ice.stringToIdentity("d"), "facetGH");
var prx = Ice.ObjectPrx.uncheckedCast(communicator.stringToProxy("d:default -p 12010"));
return prx.ice_getConnection().then(
diff --git a/js/test/Ice/inheritanceBidir/Client.js b/js/test/Ice/inheritanceBidir/Client.js
index 934c335929c..1b39fb22b1b 100644
--- a/js/test/Ice/inheritanceBidir/Client.js
+++ b/js/test/Ice/inheritanceBidir/Client.js
@@ -25,7 +25,7 @@
function(adapter)
{
var base = communicator.stringToProxy("initial:default -p 12010");
- adapter.add(new InitialI(adapter, base), communicator.stringToIdentity("initial"));
+ adapter.add(new InitialI(adapter, base), Ice.stringToIdentity("initial"));
return base.ice_getConnection().then(
function(conn)
{
diff --git a/js/test/Ice/operations/BatchOneways.js b/js/test/Ice/operations/BatchOneways.js
index c660fb0e1a1..5c4b62164b4 100644
--- a/js/test/Ice/operations/BatchOneways.js
+++ b/js/test/Ice/operations/BatchOneways.js
@@ -124,7 +124,7 @@
).then(
function()
{
- var identity = communicator.stringToIdentity("invalid");
+ var identity = Ice.stringToIdentity("invalid");
batch3 = batch.ice_identity(identity);
return batch3.ice_ping();
}
diff --git a/js/test/Ice/operations/Twoways.js b/js/test/Ice/operations/Twoways.js
index 4d238a5a0d5..8a098a5eb69 100644
--- a/js/test/Ice/operations/Twoways.js
+++ b/js/test/Ice/operations/Twoways.js
@@ -309,9 +309,9 @@
).then(
function(retval, p2, p3)
{
- test(p2.ice_getIdentity().equals(communicator.stringToIdentity("test")));
- test(p3.ice_getIdentity().equals(communicator.stringToIdentity("noSuchIdentity")));
- test(retval.ice_getIdentity().equals(communicator.stringToIdentity("test")));
+ test(p2.ice_getIdentity().equals(Ice.stringToIdentity("test")));
+ test(p3.ice_getIdentity().equals(Ice.stringToIdentity("noSuchIdentity")));
+ test(retval.ice_getIdentity().equals(Ice.stringToIdentity("test")));
si1 = new Test.Structure();
si1.p = prx;
diff --git a/js/test/Ice/operationsBidir/AMDMyDerivedClassI.js b/js/test/Ice/operationsBidir/AMDMyDerivedClassI.js
index 4b8321be069..89b164f9388 100644
--- a/js/test/Ice/operationsBidir/AMDMyDerivedClassI.js
+++ b/js/test/Ice/operationsBidir/AMDMyDerivedClassI.js
@@ -143,7 +143,7 @@
{
var p2 = p1;
var p3 = TestAMD.MyClassPrx.uncheckedCast(
- current.adapter.createProxy(current.adapter.getCommunicator().stringToIdentity("noSuchIdentity")));
+ current.adapter.createProxy(Ice.stringToIdentity("noSuchIdentity")));
var r = TestAMD.MyClassPrx.uncheckedCast(current.adapter.createProxy(current.id));
cb.ice_response(r, p2, p3);
},
diff --git a/js/test/Ice/operationsBidir/Client.js b/js/test/Ice/operationsBidir/Client.js
index 82d0add0ffe..1db516e498e 100644
--- a/js/test/Ice/operationsBidir/Client.js
+++ b/js/test/Ice/operationsBidir/Client.js
@@ -25,11 +25,11 @@
{
if(amd)
{
- adapter.add(new AMDMyDerivedClassI(), communicator.stringToIdentity("test"));
+ adapter.add(new AMDMyDerivedClassI(), Ice.stringToIdentity("test"));
}
else
{
- adapter.add(new MyDerivedClassI(), communicator.stringToIdentity("test"));
+ adapter.add(new MyDerivedClassI(), Ice.stringToIdentity("test"));
}
var base = communicator.stringToProxy("test:default -p 12010");
return base.ice_getConnection().then(
diff --git a/js/test/Ice/operationsBidir/MyDerivedClassI.js b/js/test/Ice/operationsBidir/MyDerivedClassI.js
index cdfb00eb2ff..930345c9b85 100644
--- a/js/test/Ice/operationsBidir/MyDerivedClassI.js
+++ b/js/test/Ice/operationsBidir/MyDerivedClassI.js
@@ -141,7 +141,7 @@
{
var p2 = p1;
var p3 = Test.MyClassPrx.uncheckedCast(
- current.adapter.createProxy(current.adapter.getCommunicator().stringToIdentity("noSuchIdentity")));
+ current.adapter.createProxy(Ice.stringToIdentity("noSuchIdentity")));
var r = Test.MyClassPrx.uncheckedCast(current.adapter.createProxy(current.id));
return [r, p2, p3];
},
diff --git a/js/test/Ice/optionalBidir/Client.js b/js/test/Ice/optionalBidir/Client.js
index 5365fe678d5..0e8a55de779 100644
--- a/js/test/Ice/optionalBidir/Client.js
+++ b/js/test/Ice/optionalBidir/Client.js
@@ -33,11 +33,11 @@
{
if(amd)
{
- adapter.add(new AMDInitialI(), communicator.stringToIdentity("initial"));
+ adapter.add(new AMDInitialI(), Ice.stringToIdentity("initial"));
}
else
{
- adapter.add(new InitialI(), communicator.stringToIdentity("initial"));
+ adapter.add(new InitialI(), Ice.stringToIdentity("initial"));
}
return base.ice_getConnection().then(
function(conn)
diff --git a/js/test/Ice/proxy/Client.js b/js/test/Ice/proxy/Client.js
index b3fcee3ff5d..9faca3b4160 100644
--- a/js/test/Ice/proxy/Client.js
+++ b/js/test/Ice/proxy/Client.js
@@ -326,11 +326,11 @@
// Test for bug ICE-5543: escaped escapes in stringToIdentity
//
var id = new Ice.Identity("test", ",X2QNUAzSBcJ_e$AV;E\\");
- var id2 = communicator.stringToIdentity(communicator.identityToString(id));
+ var id2 = Ice.stringToIdentity(Ice.identityToString(id));
test(id.equals(id2));
id = new Ice.Identity("test", ",X2QNUAz\\SB\\/cJ_e$AV;E\\\\");
- id2 = communicator.stringToIdentity(communicator.identityToString(id));
+ id2 = Ice.stringToIdentity(Ice.identityToString(id));
test(id.equals(id2));
out.writeLine("ok");
@@ -488,7 +488,9 @@
out.write("testing proxy methods... ");
test(communicator.identityToString(
- base.ice_identity(communicator.stringToIdentity("other")).ice_getIdentity()) === "other");
+ base.ice_identity(Ice.stringToIdentity("other")).ice_getIdentity()) === "other");
+ test(Ice.identityToString(
+ base.ice_identity(Ice.stringToIdentity("other")).ice_getIdentity()) === "other");
test(base.ice_facet("facet").ice_getFacet() === "facet");
test(base.ice_adapterId("id").ice_getAdapterId() === "id");
test(base.ice_twoway().ice_isTwoway());