public Object[] getErrors () { return SpaceUtil.inpAll(this, ERROR); } public Object getError () {
public void startService () { if (!listenerRegistered) { listenerRegistered = true; // Handle messages that could be in the in queue at start time synchronized (sp) { Object[] pending = SpaceUtil.inpAll(sp, in); sp.addListener (in, this); for (Object o : pending) sp.out(in, o); } } } public void stopService () {
@Test public void testInpAllThrowsNullPointerException() throws Throwable { try { SpaceUtil.inpAll(null, ""); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { assertNull("ex.getMessage()", ex.getMessage()); } }
@Test public void testInpAll() throws Throwable { Object[] result = SpaceUtil.inpAll(new TSpace(), "testString"); assertEquals("result.length", 0, result.length); }
@Test public void testInpAll1() throws Throwable { Space sp = SpaceFactory.getSpace("testSpaceUtilSpaceUri"); SpaceUtil.nextLong(sp, ""); Object[] result = SpaceUtil.inpAll(sp, ""); assertEquals("(TSpace) sp.entries.size()", 0, ((TSpace) sp).entries.size()); assertFalse("(TSpace) sp.entries.containsKey(\"\")", ((TSpace) sp).entries.containsKey("")); assertEquals("result.length", 1, result.length); assertEquals("result[0]", 1L, result[0]); }