@Test public void constructor() { String message = "here is my error message"; final long gadgetId = 23; GadgetDeletionException sut = new GadgetDeletionException(message, gadgetId); assertEquals("Message was not recorded right", message, sut.getMessage()); assertEquals("GadgetId was not recorded right", gadgetId, sut.getGadgetId()); }
public long getGadgetId() { return gadgetId; }
GadgetDeletionException extends Exception { public long getGadgetId() { return gadgetId; } }
GadgetDeletionException extends Exception { public long getGadgetId() { return gadgetId; } GadgetDeletionException(final String message, final long inGadgetId); }
GadgetDeletionException extends Exception { public long getGadgetId() { return gadgetId; } GadgetDeletionException(final String message, final long inGadgetId); long getGadgetId(); }
GadgetDeletionException extends Exception { public long getGadgetId() { return gadgetId; } GadgetDeletionException(final String message, final long inGadgetId); long getGadgetId();  }