Package ch.agent.crnickl.api

Examples of ch.agent.crnickl.api.UpdatableSchema.deleteAttribute()


      assertEquals(0,  ss.size());

      schema.addAttribute(1);
      schema.setAttributeProperty(1, db.getProperty("prop1", true));
      schema.setAttributeDefault(1, "t1v1");
      schema.deleteAttribute(1);
      schema.addAttribute(1);
      schema.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, D.D30105, D.D30111);
View Full Code Here


  }
 
  public void test_390_delete_and_add_attribute() {
    try {
      UpdatableSchema schema = db.getUpdatableSchemas("schema1a").iterator().next();
      schema.deleteAttribute(1);
      schema.applyUpdates();
      assertEquals(1, schema.getAttributeDefinitions().size());
      // put it back we still need it
      schema.addAttribute(1);
      schema.setAttributeProperty(1, db.getProperty("prop1", true));
View Full Code Here

      a.scan("t1v2");
      assertEquals("t1v2", a.get().toString());
      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
      schema.deleteAttribute(1);
      schema.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, null, D.D30146);
    }
View Full Code Here

      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v3", chro.getAttribute("prop1", true).get().toString());
      // remove the attribute from the base schema of schema3 (should fail)
      UpdatableSchema schema1 = db.getUpdatableSchemas("schema1a").iterator().next();
      schema1.deleteAttribute(1);
      schema1.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, null, D.D30146);
    }
View Full Code Here

  }
 
  public void test_delete_and_add_attribute() {
    try {
      UpdatableSchema schema = db.getUpdatableSchemas("schema1a").iterator().next();
      schema.deleteAttribute(1);
      schema.applyUpdates();
      assertEquals(1, schema.getAttributeDefinitions().size());
      // put it back we still need it
      schema.addAttribute(1);
      schema.setAttributeProperty(1, db.getProperty("prop1", true));
View Full Code Here

      a.scan("t1v2");
      assertEquals("t1v2", a.get().toString());
      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v2", chro.getAttribute("prop1", true).get().toString());
      schema.deleteAttribute(1);
      schema.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, null, D.D30146);
    }
View Full Code Here

      chro.setAttribute(a);
      chro.applyUpdates();
      assertEquals("t1v3", chro.getAttribute("prop1", true).get().toString());
      // remove the attribute from the base schema of schema3 (should fail)
      UpdatableSchema schema1 = db.getUpdatableSchemas("schema1a").iterator().next();
      schema1.deleteAttribute(1);
      schema1.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, null, D.D30146);
    }
View Full Code Here

      assertEquals(0,  ss.size());

      schema.addAttribute(1);
      schema.setAttributeProperty(1, db.getProperty("prop1", true));
      schema.setAttributeDefault(1, "t1v1");
      schema.deleteAttribute(1);
      schema.addAttribute(1);
      schema.applyUpdates();
      expectException();
    } catch (Exception e) {
      assertException(e, D.D30105, D.D30111);
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.