use of org.molgenis.metadata.manager.model.EditorTagIdentifier in project molgenis by molgenis.
the class TagMapperTest method testToTagReferences.
@Test
public void testToTagReferences() {
String id0 = "id0";
String id1 = "id1";
EditorTagIdentifier tagIdentifier0 = EditorTagIdentifier.create(id0, "label0");
EditorTagIdentifier tagIdentifier1 = EditorTagIdentifier.create(id1, "label1");
List<Tag> tags = copyOf(tagMapper.toTagReferences(of(tagIdentifier0, tagIdentifier1)));
assertEquals(tags.size(), 2);
assertEquals(tags.get(0).getIdValue(), id0);
assertEquals(tags.get(1).getIdValue(), id1);
}
use of org.molgenis.metadata.manager.model.EditorTagIdentifier in project molgenis by molgenis.
the class TagMapperTest method testToEditorTags.
@Test
public void testToEditorTags() {
String id0 = "id0";
String label0 = "label0";
String id1 = "id1";
String label1 = "label1";
Tag tag0 = mock(Tag.class);
when(tag0.getId()).thenReturn(id0);
when(tag0.getLabel()).thenReturn(label0);
Tag tag1 = mock(Tag.class);
when(tag1.getId()).thenReturn(id1);
when(tag1.getLabel()).thenReturn(label1);
List<EditorTagIdentifier> editorTags = tagMapper.toEditorTags(of(tag0, tag1));
assertEquals(editorTags, of(EditorTagIdentifier.create(id0, label0), EditorTagIdentifier.create(id1, label1)));
}
Aggregations