@Test public void testGetDefaultDescription() throws Exception { Mockito.when(experiment.getLabel()).thenReturn(experimentLabel); Mockito.when(experimentLabel.toString()).thenReturn("UnitTestExperiment"); ExperimentChangeEvent systemEvent = new ExperimentChangeEvent(experiment, "state", "RUNNING", "PAUSED"); Assert.assertEquals(EventLog.SYSTEM_USER.getUsername() + " changed property state of experiment UnitTestExperiment from RUNNING to PAUSED.", systemEvent.getDefaultDescription()); }
@Override public String getDefaultDescription() { return getUser().getUsername() + " changed property " + getPropertyName() + " of experiment " + getExperiment().getLabel() + " from " + getBefore() + " to " + getAfter() + "."; }
ExperimentChangeEvent extends AbstractChangeEvent implements ExperimentEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " changed property " + getPropertyName() + " of experiment " + getExperiment().getLabel() + " from " + getBefore() + " to " + getAfter() + "."; } }
ExperimentChangeEvent extends AbstractChangeEvent implements ExperimentEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " changed property " + getPropertyName() + " of experiment " + getExperiment().getLabel() + " from " + getBefore() + " to " + getAfter() + "."; } ExperimentChangeEvent(ExperimentBase experiment, String propertyName, String before, String after);  ExperimentChangeEvent(UserInfo user, ExperimentBase experiment, String propertyName, String before, String after); }
ExperimentChangeEvent extends AbstractChangeEvent implements ExperimentEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " changed property " + getPropertyName() + " of experiment " + getExperiment().getLabel() + " from " + getBefore() + " to " + getAfter() + "."; } ExperimentChangeEvent(ExperimentBase experiment, String propertyName, String before, String after);  ExperimentChangeEvent(UserInfo user, ExperimentBase experiment, String propertyName, String before, String after); @Override ExperimentBase getExperiment(); @Override String getDefaultDescription(); @Override Application.Name getApplicationName(); }
ExperimentChangeEvent extends AbstractChangeEvent implements ExperimentEvent { @Override public String getDefaultDescription() { return getUser().getUsername() + " changed property " + getPropertyName() + " of experiment " + getExperiment().getLabel() + " from " + getBefore() + " to " + getAfter() + "."; } ExperimentChangeEvent(ExperimentBase experiment, String propertyName, String before, String after);  ExperimentChangeEvent(UserInfo user, ExperimentBase experiment, String propertyName, String before, String after); @Override ExperimentBase getExperiment(); @Override String getDefaultDescription(); @Override Application.Name getApplicationName();  }