Search in sources :

Example 26 with MappingProject

use of org.molgenis.semanticmapper.mapping.model.MappingProject in project molgenis by molgenis.

the class MappingServiceImplTest method testCloneMappingProjectStringString.

@Test
public void testCloneMappingProjectStringString() {
    MappingProject mappingProject = Mockito.mock(MappingProject.class);
    when(mappingProjectRepo.getMappingProject("0")).thenReturn(mappingProject);
    mappingService.cloneMappingProject("0", "newName");
    Mockito.verify(mappingProject).removeIdentifiers();
    Mockito.verify(mappingProject).setName("newName");
    Mockito.verify(mappingProjectRepo).add(mappingProject);
}
Also used : MappingProject(org.molgenis.semanticmapper.mapping.model.MappingProject) Test(org.testng.annotations.Test)

Aggregations

MappingProject (org.molgenis.semanticmapper.mapping.model.MappingProject)26 Test (org.testng.annotations.Test)18 MappingTarget (org.molgenis.semanticmapper.mapping.model.MappingTarget)14 DynamicEntity (org.molgenis.data.support.DynamicEntity)9 EntityMapping (org.molgenis.semanticmapper.mapping.model.EntityMapping)9 User (org.molgenis.data.security.auth.User)7 AbstractMolgenisSpringTest (org.molgenis.data.AbstractMolgenisSpringTest)6 AttributeMapping (org.molgenis.semanticmapper.mapping.model.AttributeMapping)6 EntityType (org.molgenis.data.meta.model.EntityType)5 BeforeMethod (org.testng.annotations.BeforeMethod)4 Menu (org.molgenis.core.ui.menu.Menu)3 Attribute (org.molgenis.data.meta.model.Attribute)3 Transactional (org.springframework.transaction.annotation.Transactional)3 Lists (com.google.common.collect.Lists)2 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)2 Sets.newHashSet (com.google.common.collect.Sets.newHashSet)2 Collection (java.util.Collection)2 Collections (java.util.Collections)2 Collections.emptyList (java.util.Collections.emptyList)2 Collections.singletonList (java.util.Collections.singletonList)2