use of org.talend.daikon.i18n.tag.TagImpl in project components by Talend.
the class AbstractTopLevelDefinitionTest method testGetDefaultTag.
/**
* Test default tag in AbstractTopLevelDefinition. Definition name is added as a default tag, if method
* {@link AbstractTopLevelDefinition#doGetTags()} is not overriden.
*/
@Test
public void testGetDefaultTag() {
AbstractTopLevelDefinition atld = new TestingAbstractTopLevelDefinition();
Collection<TagImpl> tags = atld.getTags();
assertEquals(1, tags.size());
TagImpl tag = tags.iterator().next();
assertTrue(TagUtils.hasTag(tag, "TestName"));
assertFalse(TagUtils.hasTag(tag, "SomeOtherTag"));
}
use of org.talend.daikon.i18n.tag.TagImpl in project components by Talend.
the class SalesforceFamilyDefinitionTest method testTags.
@Test
public void testTags() {
List<? extends Definition> definitions = Lists.newArrayList(familyDefinition.getDefinitions());
for (Definition definition : definitions) {
if (definition instanceof SalesforceDefinition) {
SalesforceDefinition d = (SalesforceDefinition) definition;
assertThat(d.doGetTags(), containsInAnyOrder(new TagImpl("salesforce", CommonTags.CLOUD_TAG), new TagImpl("salesforce", CommonTags.BUSINESS_TAG)));
}
}
}
Aggregations