@Override protected void validateImport( Map<String, List<StagedModel>> dependentStagedModelsMap, Group group) throws Exception { List<StagedModel> ddmStructureDependentStagedModels = dependentStagedModelsMap.get(DDMStructure.class.getSimpleName()); Assert.assertEquals(1, ddmStructureDependentStagedModels.size()); DDMStructure ddmStructure = (DDMStructure) ddmStructureDependentStagedModels.get(0); DDMStructureLocalServiceUtil.getDDMStructureByUuidAndGroupId( ddmStructure.getUuid(), group.getGroupId()); List<StagedModel> ddmTemplateDependentStagedModels = dependentStagedModelsMap.get(DDMTemplate.class.getSimpleName()); Assert.assertEquals(2, ddmTemplateDependentStagedModels.size()); for (StagedModel ddmTemplateDependentStagedModel : ddmTemplateDependentStagedModels) { DDMTemplateLocalServiceUtil.getDDMTemplateByUuidAndGroupId( ddmTemplateDependentStagedModel.getUuid(), group.getGroupId()); } }
@Override protected void validateImportedStagedModel( StagedModel stagedModel, StagedModel importedStagedModel) throws Exception { Assert.assertTrue( stagedModel.getCreateDate() + " " + importedStagedModel.getCreateDate(), DateUtil.equals(stagedModel.getCreateDate(), importedStagedModel.getCreateDate())); Assert.assertEquals(stagedModel.getUuid(), importedStagedModel.getUuid()); Layout layout = (Layout) stagedModel; Layout importedLayout = (Layout) importedStagedModel; Assert.assertEquals(layout.getName(), importedLayout.getName()); Assert.assertEquals(layout.getTitle(), importedLayout.getTitle()); Assert.assertEquals(layout.getDescription(), importedLayout.getDescription()); Assert.assertEquals(layout.getKeywords(), importedLayout.getKeywords()); Assert.assertEquals(layout.getRobots(), importedLayout.getRobots()); Assert.assertEquals(layout.getType(), importedLayout.getType()); Assert.assertEquals(layout.getFriendlyURL(), importedLayout.getFriendlyURL()); Assert.assertEquals(layout.getCss(), importedLayout.getCss()); }