THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public interface JSONRPCBindingAtomCBinding extends Binding { QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.jsonrpcatom"); ... } public class JSONRPCBindingImplAtomBindingImpl implements JSONRPCBindingAtomBinding { private String name; private String uri; public QName getType() { return TYPE; } ... } |
...
Code Block |
---|
public class AtomTestCase { private static Node node; @BeforeClass public static void setUp() throws Exception { try { // use the contribution helper to find the location of the contribution directory // based on a class that is know to be in the contribution String contribution = ContributionLocationHelper.getContributionLocation(AtomTestCase.class); // create a note to load the contribution and run the named composite node = NodeFactory.newInstance().createNode("AtomBinding.composite", new Contribution("test", contribution)); // as an alternative to using the helper you can of course specify the location of the // contribution directly, for example, // // node = NodeFactory.newInstance().createNode(new Contribution("test", // "my/directory/structure/atom-contribution.zip")); // // Note also that no composite is named here. It is assumed that the contribution // specifies a deployable composite in the sca-contribution.xml file // start the node to make SCA services available node.start(); } catch (Exception e) { e.printStackTrace(); } } @AfterClass public static void tearDown() throws Exception { node.stop(); node.destroy(); } ... } |
...