@Test
 public void testToString() {
   IAtsWorkDefinition workDef = new MockWorkDefinition("mine");
   WorkDefinitionMatch match = new WorkDefinitionMatch(workDef.getName(), "trace");
   match.setWorkDefinition(workDef);
   Assert.assertEquals("mine", match.toString());
 }
コード例 #2
0
 @Override
 public String getName() {
   if (workflow == null) {
     return "No Artifact Input Provided";
   }
   return workflow.getName();
 }
 @Test
 public void testWorkDefinitionMatchWorkDefinitionString() {
   IAtsWorkDefinition workDef = new MockWorkDefinition("mine");
   WorkDefinitionMatch match = new WorkDefinitionMatch(workDef.getName(), "trace");
   match.setWorkDefinition(workDef);
   Assert.assertNotNull(match.getWorkDefinition());
   Assert.assertFalse(match.getTrace().isEmpty());
 }
コード例 #4
0
 @Override
 public boolean equals(Object obj) {
   if (obj instanceof AtsWorkDefConfigEditorInput) {
     AtsWorkDefConfigEditorInput otherEdInput = (AtsWorkDefConfigEditorInput) obj;
     return workflow.getName().equals(otherEdInput.workflow.getName());
   }
   return false;
 }
 @Test
 public void testIsMatched() {
   IAtsWorkDefinition workDef = new MockWorkDefinition("mine");
   WorkDefinitionMatch match = new WorkDefinitionMatch(workDef.getName(), "trace");
   match.setWorkDefinition(workDef);
   Assert.assertTrue(match.isMatched());
   match.setWorkDefinition(null);
   Assert.assertFalse(match.isMatched());
 }
コード例 #6
0
 @Override
 public int hashCode() {
   return workflow.getName().hashCode();
 }