@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()); }
@Test public void testToString() { IAtsWorkDefinition workDef = new MockWorkDefinition("mine"); WorkDefinitionMatch match = new WorkDefinitionMatch(workDef.getName(), "trace"); match.setWorkDefinition(workDef); Assert.assertEquals("mine", match.toString()); }
@Test public void testGetSetWorkDefinition() { WorkDefinitionMatch match = new WorkDefinitionMatch(); Assert.assertNull(match.getWorkDefinition()); match.setWorkDefinition(new MockWorkDefinition("mine")); Assert.assertNotNull(match.getWorkDefinition()); }
@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()); }