diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-04-24 10:33:58 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-04-24 10:33:58 +0000 |
commit | ccd5c2dfdfa15584019c15b01648681aa556229f (patch) | |
tree | d3d77e4c96198f0566a15af621145b7d3597b951 /py/test/Ice/objects/Server.py | |
parent | Added test for testing passing interface by value (diff) | |
download | ice-ccd5c2dfdfa15584019c15b01648681aa556229f.tar.bz2 ice-ccd5c2dfdfa15584019c15b01648681aa556229f.tar.xz ice-ccd5c2dfdfa15584019c15b01648681aa556229f.zip |
Added test for marshalling interface (setI method)
Diffstat (limited to 'py/test/Ice/objects/Server.py')
-rw-r--r-- | py/test/Ice/objects/Server.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/py/test/Ice/objects/Server.py b/py/test/Ice/objects/Server.py index 7bd89497ff1..6089615c391 100644 --- a/py/test/Ice/objects/Server.py +++ b/py/test/Ice/objects/Server.py @@ -25,7 +25,26 @@ Ice.loadSlice('Test.ice') Ice.loadSlice('ServerPrivate.ice') import Test, TestI +class MyObjectFactory(Ice.ObjectFactory): + def create(self, type): + if type == '::Test::I': + return TestI.II() + elif type == '::Test::J': + return TestI.JI() + elif type == '::Test::H': + return TestI.HI() + assert(False) # Should never be reached + + def destroy(self): + # Nothing to do + pass + def run(args, communicator): + factory = MyObjectFactory() + communicator.addObjectFactory(factory, '::Test::I') + communicator.addObjectFactory(factory, '::Test::J') + communicator.addObjectFactory(factory, '::Test::H') + communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000") adapter = communicator.createObjectAdapter("TestAdapter") initial = TestI.InitialI(adapter) |