Package org.openiaml.model.model.domain

Examples of org.openiaml.model.model.domain.DomainAttribute


    assertGenerated(assertHasExtendsEdge(root, registeredUser, defaultRole));

    {
      DomainAttributeInstance dai = assertHasDomainAttributeInstance(instance, "email");
      assertGenerated(dai);
      DomainAttribute actual = assertHasDomainAttribute(defaultRole, "email");
      assertGenerated(actual);
      // "Registered User.email" is actually an extension of default role.email
      DomainAttribute attr = assertHasDomainAttribute(registeredUser, "email");
      assertGenerated(attr);
      assertGenerated(assertHasExtendsEdge(root, attr, actual));
      assertGenerated(assertHasExtendsEdge(root, dai, attr));
    }

    {
      DomainAttributeInstance dai = assertHasDomainAttributeInstance(instance, "password");
      assertGenerated(dai);
      DomainAttribute actual = assertHasDomainAttribute(defaultRole, "password");
      assertGenerated(actual);
      // "Registered User.email" is actually an extension of default role.email
      DomainAttribute attr = assertHasDomainAttribute(registeredUser, "password");
      assertGenerated(attr);
      assertGenerated(assertHasExtendsEdge(root, attr, actual));
      assertGenerated(assertHasExtendsEdge(root, dai, attr));
    }
View Full Code Here


  public void testGuestAttributes() throws Exception {
    root = loadAndInfer(UserRoles.class);

    Role guest = assertHasRole(root, "User");

    DomainAttribute email = assertHasDomainAttribute(guest, "email");
    assertGenerated(email);
    DomainAttribute password = assertHasDomainAttribute(guest, "password");
    assertGenerated(password);

    // check the types
    assertEqualType(BuiltinDataTypes.getTypeEmail(), ((EXSDDataType) email.getEType()).getDefinition());
    // TODO password needs to have iamlPassword data type
View Full Code Here

  public void testInheritanceOfAttributes() throws Exception {
    root = loadAndInfer(UserRoles.class);

    Role guest = assertHasRole(root, "User");

    DomainAttribute email = assertHasDomainAttribute(guest, "email");
    assertGenerated(email);
    DomainAttribute password = assertHasDomainAttribute(guest, "password");
    assertGenerated(password);

    Role role = assertHasRole(root, "default role");

    DomainAttribute email2 = assertHasDomainAttribute(role, "email");
    assertGenerated(email2);
    DomainAttribute password2 = assertHasDomainAttribute(role, "password");
    assertGenerated(password2);

    // there should be extends wires between each attribute
    assertGenerated(assertHasExtendsEdge(root, email2, email));
    assertGenerated(assertHasExtendsEdge(root, password2, password));
View Full Code Here

  public void testInheritancePrimaryKeys() throws Exception {
    root = loadAndInfer(UserRoles.class);

    Role guest = assertHasRole(root, "User");

    DomainAttribute source_id = assertHasDomainAttribute(guest, "generated primary key");
    assertGenerated(source_id);

    Role role = assertHasRole(root, "default role");

    DomainAttribute id = assertHasDomainAttribute(role, "generated primary key");
    assertGenerated(id);
    DomainAttribute fk = assertHasDomainAttribute(role, "User.generated primary key");
    assertGenerated(fk);

    // there should be an extends wire between the PK and FK
    assertGenerated(assertHasExtendsEdge(root, fk, source_id));

    // and none between the PK and PK
    assertHasNoExtendsEdge(root, id, source_id);
    assertHasNoExtendsEdge(root, source_id, id);

    // check the types of the keys
    assertEqualType(BuiltinDataTypes.getTypeInteger(), ((EXSDDataType) id.getEType()).getDefinition());
    assertEqualType(id, fk);
    assertEqualType(BuiltinDataTypes.getTypeInteger(), ((EXSDDataType) fk.getEType()).getDefinition());

  }
View Full Code Here

    root = loadDirectly(TESTED_MODEL);

    DomainType obj = assertHasDomainType(root, "User");
    assertBreadcrumb("InternetApplication > DomainType: 'User'", obj);

    DomainAttribute password = assertHasDomainAttribute(obj, "password");
    assertBreadcrumb("InternetApplication > DomainType: 'User' > DomainAttribute: 'password'", password);

  }
View Full Code Here

    assertNotGenerated(home);

    DomainType schema = assertHasDomainType(root, "Contacts");
    assertNotGenerated(schema);

    DomainAttribute aemail = assertHasDomainAttribute(schema, "email");
    assertNotGenerated(aemail);
    DomainAttribute aname = assertHasDomainAttribute(schema, "name");
    assertNotGenerated(aname);

    DomainIterator iterator = assertHasDomainIterator(home, "Select Contact");
    assertNotGenerated(iterator);
    assertEquals(3, iterator.getLimit());
View Full Code Here

   * @throws Exception
   */
  public void testIteratorListCreated() throws Exception {

    DomainType schema = assertHasDomainType(root, "Contacts");
    DomainAttribute aemail = assertHasDomainAttribute(schema, "email");
    DomainAttribute aname = assertHasDomainAttribute(schema, "name");

    Frame home = assertHasFrame(root, "Home");
    DomainIterator iterator = assertHasDomainIterator(home, "Select Contact");
    DomainInstance instance = iterator.getCurrentInstance();
    assertGenerated(instance);
View Full Code Here

   * @throws Exception
   */
  public void testCreatedLabelOnclickPopulatesTarget_Name() throws Exception {

    DomainType schema = assertHasDomainType(root, "Contacts");
    DomainAttribute aemail = assertHasDomainAttribute(schema, "email");
    Frame home = assertHasFrame(root, "Home");
    InputForm containerForm = assertHasInputForm(home, "Select Contact");
    IteratorList list = assertHasIteratorList(containerForm, "Select Contact");
    Label lname = assertHasLabel(list, "name");
    Label lemail = assertHasLabel(list, "email");
View Full Code Here

   * @throws Exception
   */
  public void testCreatedLabelOnclickPopulatesTarget_Email() throws Exception {

    DomainType schema = assertHasDomainType(root, "Contacts");
    DomainAttribute aemail = assertHasDomainAttribute(schema, "email");
    Frame home = assertHasFrame(root, "Home");
    InputForm containerForm = assertHasInputForm(home, "Select Contact");
    IteratorList list = assertHasIteratorList(containerForm, "Select Contact");
    Label lemail = assertHasLabel(list, "email");

View Full Code Here

    assertNotGenerated(session);

    DomainType obj = assertHasDomainType(root, "User");
    assertNotGenerated(obj);

    DomainAttribute password = assertHasDomainAttribute(obj, "password");
    assertNotGenerated(password);

    LoginHandler handler = assertHasLoginHandler(session, "login handler");
    assertNotGenerated(handler);
    assertEquals(handler.getType(), LoginHandlerTypes.DOMAIN_OBJECT);
View Full Code Here

TOP

Related Classes of org.openiaml.model.model.domain.DomainAttribute

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.