@Test public void testAddInstructionSet () { Instructions instructions = new Instructions (null, null); try { instructions.getExecutor (INSTRUCTION_NAME); fail ("no exception"); } catch (ExecutionException ee) { } try { instructions.getExecutor (INSTRUCTION_SET_NAME + "." + INSTRUCTION_NAME); fail ("no exception"); } catch (ExecutionException ee) { } InstructionSet instructionSet = new InstructionSetImpl (INSTRUCTION_SET_NAME); instructions.addInstructionSet (instructionSet); assertNotNull (instructions.getExecutor (INSTRUCTION_NAME)); assertNotNull (instructions.getExecutor (INSTRUCTION_SET_NAME + "." + INSTRUCTION_NAME)); assertNotNull (instructions.getExecutor (INSTRUCTION_NAME)); }
void addInstructionSet (InstructionSet instructionSet) { String name = instructionSet.getName (); if (!mInstructionSets.containsKey (name)) { mInstructionSets.put (name, instructionSet); instructionSet.setup (); mExecutorCache.clear (); } else { throw new ExecutionException ("an instruction set '%s' is already registered", name); } }
Instructions { void addInstructionSet (InstructionSet instructionSet) { String name = instructionSet.getName (); if (!mInstructionSets.containsKey (name)) { mInstructionSets.put (name, instructionSet); instructionSet.setup (); mExecutorCache.clear (); } else { throw new ExecutionException ("an instruction set '%s' is already registered", name); } } }
Instructions { void addInstructionSet (InstructionSet instructionSet) { String name = instructionSet.getName (); if (!mInstructionSets.containsKey (name)) { mInstructionSets.put (name, instructionSet); instructionSet.setup (); mExecutorCache.clear (); } else { throw new ExecutionException ("an instruction set '%s' is already registered", name); } } Instructions(ProcedureRunner runner, TestRunResultPublisher publisher); }
Instructions { void addInstructionSet (InstructionSet instructionSet) { String name = instructionSet.getName (); if (!mInstructionSets.containsKey (name)) { mInstructionSets.put (name, instructionSet); instructionSet.setup (); mExecutorCache.clear (); } else { throw new ExecutionException ("an instruction set '%s' is already registered", name); } } Instructions(ProcedureRunner runner, TestRunResultPublisher publisher);  }
Instructions { void addInstructionSet (InstructionSet instructionSet) { String name = instructionSet.getName (); if (!mInstructionSets.containsKey (name)) { mInstructionSets.put (name, instructionSet); instructionSet.setup (); mExecutorCache.clear (); } else { throw new ExecutionException ("an instruction set '%s' is already registered", name); } } Instructions(ProcedureRunner runner, TestRunResultPublisher publisher);   }