package org.eclipse.mdm.businessobjects.utils; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import org.junit.Test; | |
public class ServiceUtilsTest { | |
@Test | |
public void testWorkaroundForTypeMapping() { | |
assertThat(ServiceUtils.workaroundForTypeMapping("asdf")).isEqualTo("asdf"); | |
assertThat(ServiceUtils.workaroundForTypeMapping("Project")).isEqualTo("Project"); | |
assertThat(ServiceUtils.workaroundForTypeMapping("StructureLevel")).isEqualTo("Pool"); | |
assertThat(ServiceUtils.workaroundForTypeMapping("MeaResult")).isEqualTo("Measurement"); | |
assertThat(ServiceUtils.workaroundForTypeMapping("SubMatrix")).isEqualTo("ChannelGroup"); | |
assertThat(ServiceUtils.workaroundForTypeMapping("MeaQuantity")).isEqualTo("Channel"); | |
} | |
@Test | |
public void testInvertMapping() { | |
assertThat(ServiceUtils.invertMapping("asdf")).isEqualTo("asdf"); | |
assertThat(ServiceUtils.invertMapping("Project")).isEqualTo("Project"); | |
assertThat(ServiceUtils.invertMapping("Pool")).isEqualTo("StructureLevel"); | |
assertThat(ServiceUtils.invertMapping("Measurement")).isEqualTo("MeaResult"); | |
assertThat(ServiceUtils.invertMapping("ChannelGroup")).isEqualTo("SubMatrix"); | |
assertThat(ServiceUtils.invertMapping("Channel")).isEqualTo("MeaQuantity"); | |
} | |
} |