public static void oneTimeSetUp( ObjectStore os, String osWriterName, String modelName, String itemsXmlFilename) throws Exception { osForOsTests = os; storeDataWriter = ObjectStoreWriterFactory.getObjectStoreWriter(osWriterName); data = ObjectStoreTestUtils.getTestData(modelName, itemsXmlFilename); ObjectStoreTestUtils.storeData(storeDataWriter, data); queries.put("ContainsDuplicatesMN", generateContainsDuplicatesMNQuery()); queries.put("ContainsN1", generateContainsN1Query()); queries.put("SelectSimpleObject", generateSelectSimpleObjectQuery()); queries.put("SimpleGroupBy", generateSimpleGroupByQuery()); queries.put("WhereClassClass", generateWhereClassClassQuery()); queries.put("WhereClassObject", generateWhereClassObjectQuery()); }
@BeforeClass public static void setUp() throws Exception { ObjectStoreWriter osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(osw, data); osw.close(); }
public void setUp() throws Exception { super.setUp(); pm = im.getProfileManager(); storeDataWriter = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(storeDataWriter, data); }
@Before public void setUp() throws Exception { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); os = osw.getObjectStore(); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(osw, data); }
public static void oneTimeSetUp( String osName, String osWriterName, String modelName, String itemsXmlFilename) throws Exception { os = ObjectStoreFactory.getObjectStore(osName); storeDataWriter = ObjectStoreWriterFactory.getObjectStoreWriter(osWriterName); // As required clean up any junk other tests have left behind // TODO: Really we should just wipe the objectstore between tests or at least test classes, if this is // performance feasible System.out.println("Deleted " + ObjectStoreTestUtils.deleteAllObjectsInClass(storeDataWriter, Contractor.class) + " " + Contractor.class); //System.out.println("Deleted " + ObjectStoreTestUtils.deleteAllObjectsInClass(os, storeDataWriter, Employable.class) + " " + Employable.class); System.out.println("Deleted " + ObjectStoreTestUtils.deleteAllObjectsInClass(storeDataWriter, Employee.class) + " " + Employee.class); System.out.println("Deleted " + ObjectStoreTestUtils.deleteAllObjectsInClass(storeDataWriter, Secretary.class) + " " + Employee.class); data = ObjectStoreTestUtils.getTestData(modelName, itemsXmlFilename); ObjectStoreTestUtils.storeData(storeDataWriter, data); setUpQueries(); setUpResults(); }
@Before public void setUp() throws Exception { ObjectStoreWriter osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); os = osw.getObjectStore(); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(osw, data); osw.close(); }
@BeforeClass public static void setUp() throws Exception { ObjectStoreWriter osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); os = osw.getObjectStore(); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(osw, data); osw.close(); }
public void setUp() throws Exception { super.setUp(); classKeys = im.getClassKeys(); pm = im.getProfileManager(); storeDataWriter = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(storeDataWriter, data); setUpUserProfiles(); }
@Before public void setUp() throws Exception { osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); os = osw.getObjectStore(); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(osw, data); runner = getRunner(true); runnerMatchAll = getRunner(false); }
public void setUp() throws Exception { super.setUp(); classKeys = im.getClassKeys(); pm = im.getProfileManager(); storeDataWriter = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(storeDataWriter, data); setUpUserProfiles(); }
@Before public void setUp() throws Exception { Model model = Model.getInstanceByName("testmodel"); ObjectStoreWriter osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); os = osw.getObjectStore(); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(osw, data); osw.close(); uosw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.userprofile-test"); pm = new ProfileManager(os, uosw); profile = new Profile(pm, "testUser", null, "password", new HashMap(), new HashMap(), new HashMap(), null, true, false); pm.createProfile(profile); TemplateQuery twoConstraints = new TemplateQuery("twoConstraints", "twoConstraints", "", new PathQuery(model)); twoConstraints.addViews("Employee.name", "Employee.age"); PathConstraint ageCon = Constraints.greaterThan("Employee.age", "30"); twoConstraints.addConstraint(ageCon); twoConstraints.setEditable(ageCon, true); PathConstraint depCon = Constraints.greaterThan("Employee.department.name", "Finance"); twoConstraints.addConstraint(depCon); twoConstraints.setEditable(depCon, true); profile.saveTemplate("template", new ApiTemplate(twoConstraints)); }
@Before public void setUp() throws Exception { ObjectStoreWriter osw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.unittest"); os = osw.getObjectStore(); Map data = ObjectStoreTestUtils.getTestData("testmodel", "testmodel_data.xml"); ObjectStoreTestUtils.storeData(osw, data); osw.close(); uosw = ObjectStoreWriterFactory.getObjectStoreWriter("osw.userprofile-test"); ProfileManager pm = new ProfileManager(os, uosw); profile = new Profile(pm, "test", null, "test", null, null, null, true, false); pm.createProfile(profile); ApiTemplate template = new ApiTemplate("convertEmployeesToAddresses", "", "", new PathQuery(os.getModel())); template.addViews("Employee.id", "Employee.address.id"); PathConstraint employeeId = Constraints.eq("Employee.id", "0"); template.addConstraint(employeeId); template.setEditable(employeeId, true); conversionTemplates = new ArrayList<ApiTemplate>(Collections.singleton(template)); }