Search in sources :

Example 1 with EditorPackageIdentifier

use of org.molgenis.metadata.manager.model.EditorPackageIdentifier in project molgenis by molgenis.

the class PackageMapperTest method testToPackageReference.

@Test
public void testToPackageReference() {
    String id = "id0";
    EditorPackageIdentifier packageIdentifier = EditorPackageIdentifier.create(id, "label");
    Package package_ = packageMapper.toPackageReference(packageIdentifier);
    assertEquals(package_.getIdValue(), id);
}
Also used : Package(org.molgenis.data.meta.model.Package) EditorPackageIdentifier(org.molgenis.metadata.manager.model.EditorPackageIdentifier) Test(org.testng.annotations.Test)

Example 2 with EditorPackageIdentifier

use of org.molgenis.metadata.manager.model.EditorPackageIdentifier in project molgenis by molgenis.

the class PackageMapperTest method testToEditorPackage.

@Test
public void testToEditorPackage() {
    String id = "id0";
    String label = "label0";
    Package package_ = mock(Package.class);
    when(package_.getId()).thenReturn(id);
    when(package_.getLabel()).thenReturn(label);
    EditorPackageIdentifier editorPackage = packageMapper.toEditorPackage(package_);
    assertEquals(editorPackage, EditorPackageIdentifier.create(id, label));
}
Also used : Package(org.molgenis.data.meta.model.Package) EditorPackageIdentifier(org.molgenis.metadata.manager.model.EditorPackageIdentifier) Test(org.testng.annotations.Test)

Aggregations

Package (org.molgenis.data.meta.model.Package)2 EditorPackageIdentifier (org.molgenis.metadata.manager.model.EditorPackageIdentifier)2 Test (org.testng.annotations.Test)2