@Before public void setUp() { _persistence = LayoutSetUtil.getPersistence(); Class<?> clazz = _persistence.getClass(); _dynamicQueryClassLoader = clazz.getClassLoader(); }
@Test @Transactional public void testExportImportLayoutSetInvalidLARType() throws Exception { LayoutSetUtil.removeAll(); // Import a layout set to a layout prototype group = GroupTestUtil.addGroup(); LayoutPrototype layoutPrototype = LayoutTestUtil.addLayoutPrototype(ServiceTestUtil.randomString()); importedGroup = layoutPrototype.getGroup(); long[] layoutIds = new long[0]; try { exportImportLayouts(layoutIds, getImportParameterMap()); Assert.fail(); } catch (LARTypeException lte) { } // Import a layout set to a layout set prototype LayoutSetPrototype layoutSetPrototype = LayoutTestUtil.addLayoutSetPrototype(ServiceTestUtil.randomString()); importedGroup = layoutSetPrototype.getGroup(); try { exportImportLayouts(layoutIds, getImportParameterMap()); Assert.fail(); } catch (LARTypeException lte) { } }