Package de.mhus.lib.test.adb.model

Examples of de.mhus.lib.test.adb.model.Store


      assertEquals(count, 0);

      // -------------
      // test comfortable object
     
      Store s1 = new Store();
      s1.setName("Creasy Bookstore");
      s1.setAddress("The Oaks\nDublin");
      s1.create(manager);
     
      s1.setAddress("The Lakes\nDublin");
      s1.save();
     
      // test change in another session and reload
      Store s2 = (Store) manager.getObject(Store.class, s1.getId());
      s2.setAddress("");
      s2.save();
     
      s1.reload();
      assertEquals(s1.getAddress(), s2.getAddress());
     
      // remove and check behavior of updates
      s1.remove();
     
      try {
        s2.reload();
        assertTrue(false);
      } catch (MException e) {
        System.out.println(e);
      }

      try {
        s2.save();
        assertTrue(false);
      } catch (MException e) {
        System.out.println(e);
      }
     
View Full Code Here

TOP

Related Classes of de.mhus.lib.test.adb.model.Store

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.