@Test public void testAddInstructionSetTwice () { Instructions instructions = new Instructions (null, null); instructions.addInstructionSet (new InstructionSetImpl (INSTRUCTION_SET_NAME)); try { instructions.addInstructionSet (new InstructionSetImpl (INSTRUCTION_SET_NAME)); fail ("no exception"); } catch (ExecutionException ee) { } }
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);   }