6a0d27d9fb491670bf1ac429585a86bfe579c955
[proteocache.git] / testsrc / compbio / engine / EngineConfiguratorTester.java
1 /* Copyright (c) 2009 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0     \r
4  * \r
5  *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
6  *  Apache License version 2 as published by the Apache Software Foundation\r
7  * \r
8  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
9  *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
10  *  License for more details.\r
11  * \r
12  *  A copy of the license is in apache_license.txt. It is also available here:\r
13  * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
14  * \r
15  * Any republication or derived work distributed in source code form\r
16  * must include this copyright and license notice.\r
17  */\r
18 \r
19 package compbio.engine;\r
20 \r
21 import static org.testng.Assert.fail;\r
22 \r
23 import org.testng.annotations.Test;\r
24 \r
25 import compbio.engine.client.ConfiguredExecutable;\r
26 import compbio.metadata.JobSubmissionException;\r
27 import compbio.runner.msa.ClustalW;\r
28 \r
29 public class EngineConfiguratorTester {\r
30 \r
31         @Test\r
32         public void testGetAsyncEngine() {\r
33 \r
34                 ClustalW clustal = new ClustalW();\r
35 \r
36                 try {\r
37                         SyncExecutor sEngine = Configurator.getSyncEngine(Configurator\r
38                                         .configureExecutable(clustal));\r
39                 } catch (JobSubmissionException e) {\r
40                         e.printStackTrace();\r
41                         fail(e.getMessage());\r
42                 }\r
43         }\r
44 \r
45         @Test\r
46         public void testGetSyncEngine() {\r
47                 ClustalW clustal = new ClustalW();\r
48                 try {\r
49                         ConfiguredExecutable<ClustalW> confClust = Configurator\r
50                                         .configureExecutable(clustal);\r
51                         AsyncExecutor aEngine = Configurator.getAsyncEngine(confClust);\r
52                 } catch (JobSubmissionException e) {\r
53                         e.printStackTrace();\r
54                         fail(e.getMessage());\r
55                 }\r
56         }\r
57 \r
58 }\r