use of com.blackducksoftware.integration.hub.alert.channel.hipchat.controller.global.GlobalHipChatConfigRestModel in project hub-alert by blackducksoftware.
the class ObjectTransformerTest method testTransformHipchatModels.
@Test
public void testTransformHipchatModels() throws Exception {
final MockHipChatGlobalEntity mockHipChatGlobalEntity = new MockHipChatGlobalEntity();
final MockHipChatGlobalRestModel hipChatMockUtils = new MockHipChatGlobalRestModel();
final ObjectTransformer objectTransformer = new ObjectTransformer();
final GlobalHipChatConfigRestModel restModel = hipChatMockUtils.createGlobalRestModel();
final GlobalHipChatConfigEntity configEntity = mockHipChatGlobalEntity.createGlobalEntity();
final GlobalHipChatConfigEntity transformedConfigEntity = objectTransformer.configRestModelToDatabaseEntity(restModel, GlobalHipChatConfigEntity.class);
final GlobalHipChatConfigRestModel transformedConfigRestModel = objectTransformer.databaseEntityToConfigRestModel(configEntity, GlobalHipChatConfigRestModel.class);
assertEquals(restModel, transformedConfigRestModel);
assertEquals(configEntity, transformedConfigEntity);
}
Aggregations