Examples of employees()


Examples of er.erxtest.model.Company.employees()

    // Fetch and check employees for Company1 in OSC1
    assertContainsExactlyEOs(new NSArray<Employee>(new Employee[] { employee2_osc1 }), company_osc1.employees());

    // Fetch and check employees for Company1 in OSC2
    assertContainsExactlyEOs(new NSArray<Employee>(new Employee[] { employee2_osc1 }), company_osc2.employees());

    // ... Do someting with the deleted object in OSC2

    // Delete the remaining employee in OSC2 and Save
    editingContext_osc2.deleteObject(secondEmployee_osc2);
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    // Fetch and check employees for Company1 in OSC1
    assertContainsExactlyEOs(NSArray.EmptyArray, company_osc1.employees());

    // Fetch and check employees for Company1 in OSC2
    assertContainsExactlyEOs(NSArray.EmptyArray, company_osc2.employees());
  }

  public static void assertEOEquals(Object obj1, Object obj2) {
    if (obj1 != null && obj2 != null && obj1 instanceof EOEnterpriseObject && obj2 instanceof EOEnterpriseObject) {
      EOEnterpriseObject eo1 = (EOEnterpriseObject) obj1;
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    p1.setCompany(company);
    p1.setCompany(company2);

    assertEquals(company2, p1.company());
    assertEquals(0, company.employees().count());
    assertEquals(1, company2.employees().count());
    assertEquals(p1, company2.employees().objectAtIndex(0));
  }

  public void testAutoRemoveFromToManyImplicitToOne() {
    EOEditingContext editingContext = ERXEC.newEditingContext();
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    p1.setCompany(company2);

    assertEquals(company2, p1.company());
    assertEquals(0, company.employees().count());
    assertEquals(1, company2.employees().count());
    assertEquals(p1, company2.employees().objectAtIndex(0));
  }

  public void testAutoRemoveFromToManyImplicitToOne() {
    EOEditingContext editingContext = ERXEC.newEditingContext();
    Company company = Company.createCompany(editingContext, "XYZ");
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    Employee p1 = (Employee) EOUtilities.createAndInsertInstance(editingContext, Employee.ENTITY_NAME);
    company.addToEmployees(p1);
    company.removeFromEmployees(p1);

    assertEquals(null, p1.company());
    assertEquals(0, company.employees().count());
  }

  public void testAutoSetTwoToOnesImplicitToMany() {
    EOEditingContext editingContext = ERXEC.newEditingContext();
    Company company = Company.createCompany(editingContext, "XYZ");
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    p1.setCompany(company);
    p2.setCompany(company);

    assertEquals(company, p1.company());
    assertEquals(company, p2.company());
    assertEquals(2, company.employees().count());
    assertTrue(company.employees().containsObject(p1));
    assertTrue(company.employees().containsObject(p2));
  }

  public void testAutoRemoveFromToManyWithManyImplicitToOne() {
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    p2.setCompany(company);

    assertEquals(company, p1.company());
    assertEquals(company, p2.company());
    assertEquals(2, company.employees().count());
    assertTrue(company.employees().containsObject(p1));
    assertTrue(company.employees().containsObject(p2));
  }

  public void testAutoRemoveFromToManyWithManyImplicitToOne() {
    EOEditingContext editingContext = ERXEC.newEditingContext();
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    assertEquals(company, p1.company());
    assertEquals(company, p2.company());
    assertEquals(2, company.employees().count());
    assertTrue(company.employees().containsObject(p1));
    assertTrue(company.employees().containsObject(p2));
  }

  public void testAutoRemoveFromToManyWithManyImplicitToOne() {
    EOEditingContext editingContext = ERXEC.newEditingContext();
    Company company = Company.createCompany(editingContext, "XYZ");
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    company.addToEmployees(p2);
    company.removeFromEmployees(p1);

    assertEquals(null, p1.company());
    assertEquals(company, p2.company());
    assertEquals(1, company.employees().count());
    assertEquals(p2, company.employees().objectAtIndex(0));
  }
 
  public void testRevertToManyWithoutInverseRelationshipUpdating() {
    testRevertToMany(false);
View Full Code Here

Examples of er.erxtest.model.Company.employees()

    company.removeFromEmployees(p1);

    assertEquals(null, p1.company());
    assertEquals(company, p2.company());
    assertEquals(1, company.employees().count());
    assertEquals(p2, company.employees().objectAtIndex(0));
  }
 
  public void testRevertToManyWithoutInverseRelationshipUpdating() {
    testRevertToMany(false);
  }
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.