protected LocalWorker getLocalWorker() { return new FailIfFalse(); } }
public void testOnNotTrue() throws Exception { DataThing thing=new DataThing("false"); FailIfFalse ifFalse = new FailIfFalse(); HashMap inputs=new HashMap(); inputs.put("test",thing); try { ifFalse.execute(inputs); fail("TaskExecutionException should have been thrown"); } catch(TaskExecutionException e) { } }
public void testOnTrue() throws Exception { DataThing thing=new DataThing("true"); FailIfFalse ifFalse = new FailIfFalse(); HashMap inputs=new HashMap(); inputs.put("test",thing); try { Map output=ifFalse.execute(inputs); assertEquals("returned map should be empty",0,output.size()); } catch(TaskExecutionException e) { fail("TaskExecutionException should not have been thrown"); } }