4142434445464748495051
try { Assert.assertFalse(context.isActive()); context.activate(); Assert.assertTrue(context.isActive()); ObjectStore store = context.getObjectStore(); store.add(Boolean.class, true);
6364656667686970717273
Assert.fail("Trying to get ObjectStore outside active context should have thrown Exception"); } catch (Exception e) { } context.activate(); store = context.getObjectStore(); Assert.assertEquals( "Verify that we can get objects from a active context", new Boolean(true),
8687888990919293949596
{ final CountDownLatch latch = new CountDownLatch(1); final SuiteContext context = new SuiteContextImpl(); try { context.activate(); context.getObjectStore().add(Object.class, new Object()); Thread thread = new Thread() { public void run()