Examples of applyUpdates()


Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

    Chronicle testData = db.getChronicle(FULLNAME, false);
    if (testData != null) {
      Util.deleteChronicleCollection(testData);
      UpdatableChronicle upd = testData.edit();
      upd.destroy();
      upd.applyUpdates();
      db.commit();
    }
  }
 
  @Override
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

  }

  public void test_010() {
    try {
      UpdatableChronicle testEntity = ((UpdatableChronicle)db.getTopChronicle()).createChronicle(SIMPLENAME, false, "test", null, null);
      testEntity.applyUpdates();
      assertEquals(FULLNAME, testEntity.getName(true));
    } catch (Exception e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

  }
 
  public void test_020() {
    try {
      UpdatableChronicle testEntity = ((UpdatableChronicle)db.getTopChronicle()).createChronicle(SIMPLENAME, false, "test", null, null);
      testEntity.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, D.D40126);
    }
  }
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

 
  public void test_030() {
    try {
      UpdatableChronicle testEntity = db.getChronicle(FULLNAME, true).edit();
      testEntity.destroy();
      testEntity.applyUpdates();
      assertFalse(testEntity.getSurrogate().getObject().isValid());
    } catch (Exception e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

  }
 
  public void test_050() {
    try {
      UpdatableChronicle e = db.getTopChronicle().edit().createChronicle(SIMPLENAME, false, "junit test 001", null, null);
      e.applyUpdates();
      Attribute<?> a = e.getAttribute("foo", false);
      assertNull(a);
      a = e.getAttribute("bar", true);
      expectException();
    } catch (Exception e) {
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

 
  public void test_070_UpdateChronicleName() {
    try {
      UpdatableChronicle chron = db.getChronicle(FULLNAME, true).edit();
      chron.setName(SIMPLENAME_UPDATED);
      chron.applyUpdates();
      assertEquals(SIMPLENAME_UPDATED,  db.getChronicle(FULLNAME_UPDATED, true).getName(false));
    } catch (Exception e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

 
  public void test_080_UpdateChronicleNameToNull() {
    try {
      UpdatableChronicle chron = db.getChronicle(FULLNAME_UPDATED, true).edit();
      chron.setName(null);
      chron.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, D.D01103);
    }
  }
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

 
  public void test_090_UpdateChronicleNameToIllegal() {
    try {
      UpdatableChronicle chron = db.getChronicle(FULLNAME_UPDATED, true).edit();
      chron.setName("!@#");
      chron.applyUpdates();
      System.out.println(chron.getName(true));
      expectException();
    } catch (Exception e) {
      assertException(e, D.D01104);
    }
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

 
  public void test_100_UpdateChronicleNameToEmpty() {
    try {
      UpdatableChronicle chron = db.getChronicle(FULLNAME_UPDATED, true).edit();
      chron.setName("");
      chron.applyUpdates();
      System.out.println(chron.getName(true));
      expectException();
    } catch (Exception e) {
      assertException(e, D.D01103);
    }
View Full Code Here

Examples of ch.agent.crnickl.api.UpdatableChronicle.applyUpdates()

 
  public void test_110_UpdateChronicleDescription() {
    try {
      UpdatableChronicle chron = db.getChronicle(FULLNAME_UPDATED, true).edit();
      chron.setDescription("anything");
      chron.applyUpdates();
      assertEquals("anything",  db.getChronicle(FULLNAME_UPDATED, true).getDescription(false));
    } catch (Exception e) {
      fail(e.getMessage());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.