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