Package er.erxtest.model

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


      Company c = (Company) ec.faultForGlobalID(cGid, ec);
      // Add a new item to employees relationship
      @SuppressWarnings("unused")
      Employee e4 = c.createEmployeesRelationship();
      // I expect relationship to NOT be a fault
      Object relationshipValue = c.storedValueForKey(Company.EMPLOYEES_KEY);
      assertFalse(EOFaultHandler.isFault(relationshipValue));
      Integer count = ERXEOControlUtilities.objectCountForToManyRelationship(c, Company.EMPLOYEES_KEY);
      assertEquals(4, count.intValue());
    } finally {
      ec.unlock();
View Full Code Here


    cGid = ERXTestUtilities.createCompanyAndNoEmployees();
    ec.lock();
    try {
      Company c = (Company) ec.faultForGlobalID(cGid, ec);
      // Fire the fault
      Object relationshipValue = c.storedValueForKey(Company.EMPLOYEES_KEY);
      assertTrue(EOFaultHandler.isFault(relationshipValue));
      EOFaulting fault = (EOFaulting) relationshipValue;
      // Fire the fault
      fault.faultHandler().completeInitializationOfObject(fault);
     
View Full Code Here

      // Fetch Company with cGid
      c = (Company) ec1.faultForGlobalID(cGid, ec1);
      // c will be a fault
      assertTrue(EOFaultHandler.isFault(c));
     
      relationshipValue = c.storedValueForKey(Company.EMPLOYEES_KEY);
     
      // c will no longer be a fault
      assertFalse(EOFaultHandler.isFault(c));
     
      // relationshipValue will be a fault
View Full Code Here

      ERXTestUtilities.fireFault(relationshipValue);

      // -----------------------------------------
      // Fetch Company with cGid0
      c = (Company) ec1.faultForGlobalID(cGid0, ec1);
      relationshipValue = c.storedValueForKey(Company.EMPLOYEES_KEY);
      assertTrue(EOFaultHandler.isFault(relationshipValue));
      // Fire the fault to fetch and to ensure snapshot is registered in eodb
      ERXTestUtilities.fireFault(relationshipValue);

    } finally {
View Full Code Here

    ec2.lock();
    try {
      // Fetch Company with cGid
      c = (Company) ec2.faultForGlobalID(cGid, ec2);
      // Expect relationship to be a fault
      relationshipValue = c.storedValueForKey(Company.EMPLOYEES_KEY);
      assertTrue(EOFaultHandler.isFault(relationshipValue));
     
      // There will be a snapshot in the db
      NSArray toManySnapshot = ERXTestUtilities.snapshotArrayForRelationshipInObject(c, Company.EMPLOYEES_KEY);
      assertNotNull(toManySnapshot);
View Full Code Here

     
      // -----------------------------------------
      // Fetch Company with cGid0
      c = (Company) ec2.faultForGlobalID(cGid0, ec2);
      // Expect relationship to be a fault
      relationshipValue = c.storedValueForKey(Company.EMPLOYEES_KEY);
      assertTrue(EOFaultHandler.isFault(relationshipValue));

      // There will be a snapshot in the db
      toManySnapshot = ERXTestUtilities.snapshotArrayForRelationshipInObject(c, Company.EMPLOYEES_KEY);
      assertNotNull(toManySnapshot);
View Full Code Here

    EOEditingContext ec1 = ERXEC.newEditingContext(osc);
    ec1.lock();
    try {
      Company c = (Company) ec1.faultForGlobalID(cGid, ec1);
      // We expect relationship to be a fault
      Object relationshipValue = c.storedValueForKey(Company.EMPLOYEES_KEY);
      assertTrue(EOFaultHandler.isFault(relationshipValue));
     
      // There will be no snapshot in the db
      NSArray toManySnapshot = ERXTestUtilities.snapshotArrayForRelationshipInObject(c, Company.EMPLOYEES_KEY);
      assertNull(toManySnapshot);
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.