diff options
author | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-05-05 15:29:01 +0000 |
---|---|---|
committer | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-05-05 15:29:01 +0000 |
commit | b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd (patch) | |
tree | 0883f08a408f89f758e9a1be629232e3dd055c3a /bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java | |
parent | 83a9b613836910f7edc370c2fe60fa2268dc4461 (diff) | |
download | mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.tar.gz mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.tar.bz2 mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.zip |
Merged feature branch mocca-1.2.13-id@r724 back to trunk.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@725 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java')
-rw-r--r-- | bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java index 7a087b38..4b89880d 100644 --- a/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java +++ b/bkucommon/src/test/java/at/gv/egiz/bku/slcommands/SLCommandFactoryTest.java @@ -34,13 +34,11 @@ import at.gv.egiz.bku.slexceptions.SLCommandException; import at.gv.egiz.bku.slexceptions.SLRequestException; import at.gv.egiz.bku.slexceptions.SLRuntimeException; import at.gv.egiz.bku.slexceptions.SLVersionException; -import at.gv.egiz.stal.dummy.DummySTAL; public class SLCommandFactoryTest { protected static ApplicationContext appCtx; - SLCommandFactory factory; - SLCommandContext context; + protected SLCommandFactory factory; @BeforeClass public static void setUpClass() { @@ -49,9 +47,10 @@ public class SLCommandFactoryTest { @Before public void setUp() { - factory = SLCommandFactory.getInstance(); - context = new SLCommandContext(); - context.setSTAL(new DummySTAL()); + Object bean = appCtx.getBean("slCommandFactory"); + assertTrue(bean instanceof SLCommandFactory); + + factory = (SLCommandFactory) bean; } @Test @@ -60,7 +59,7 @@ public class SLCommandFactoryTest { "<NullOperationRequest xmlns=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>"); Source source = new StreamSource(requestReader); - SLCommand slCommand = factory.createSLCommand(source, context); + SLCommand slCommand = factory.createSLCommand(source); assertTrue(slCommand instanceof NullOperationCommand); } @@ -71,7 +70,7 @@ public class SLCommandFactoryTest { "<CreateCMSSignatureRequest xmlns=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2# file:/home/clemens/IAIK/BKU2/svn/bku/utils/src/main/schema/Core-1.2.xsd\" Structure=\"detached\"><KeyboxIdentifier></KeyboxIdentifier><DataObject><MetaInfo><MimeType></MimeType></MetaInfo><Content><Base64Content></Base64Content></Content></DataObject></CreateCMSSignatureRequest>"); Source source = new StreamSource(requestReader); - factory.createSLCommand(source, context); + factory.createSLCommand(source); } @@ -83,7 +82,7 @@ public class SLCommandFactoryTest { "</NullOperationRequest>"); Source source = new StreamSource(requestReader); - factory.createSLCommand(source, context); + factory.createSLCommand(source); } |