blob: 1485d35b0eeea424e3c81ed5fed3159eda15fec3 [file] [log] [blame]
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");
}
}