public static Customer createCustAndOrder(String custName) { ResetBasicData me = new ResetBasicData(); Customer cust1 = insertCustomer(custName); me.createOrder1(cust1); return cust1; }
@Test public void testDoubleUnparsedQuery() { // Checks for RawSql caching issue https://github.com/ebean-orm/avaje-ebeanorm/issues/259 ResetBasicData.reset(); test(); test(); }
public static synchronized void reset() { if (runOnce) { return; } final ResetBasicData me = new ResetBasicData(); server.execute( () -> { if (server.find(Product.class).findCount() > 0) { // we can't really delete this base data as // the test rely on the products being in there return; } // me.deleteAll(); me.insertCountries(); me.insertProducts(); me.insertTestCustAndOrders(); }); runOnce = true; }