SellerCannotCreateCustomerTest.java :  » ERP-CRM-Financial » OpenXava-3.0 » org » openxava » test » tests » Java Open Source

Java Open Source » ERP CRM Financial » OpenXava 3.0 
OpenXava 3.0 » org » openxava » test » tests » SellerCannotCreateCustomerTest.java
package org.openxava.test.tests;

import org.openxava.tests.*;


/**
 * @author Javier Paniza
 */

public class SellerCannotCreateCustomerTest extends ModuleTestBase {
  

  public SellerCannotCreateCustomerTest(String testName) {
    super(testName, "SellerCannotCreateCustomer");    
  }

  /* Since v2.2 this does not apply. See at testEntityReferenceCollections to
   * see the current entity collection behaviour
  public void testNotCreateNewReferenceFromCollection() throws Exception {
    execute("CRUD.new");
    execute("Collection.new", "viewObject=xava_view_section0_customers");
    assertExists("customers.number"); // to verify that collection element view is opened
    assertNoAction("Reference.createNew");
    assertNoAction("Reference.modify");
  }
  */
  
  public void testMembersOfReferenceToEntityNotEditableInSection_notCreateNewReferenceFromCollectionOnEdit() throws Exception {
    execute("Mode.detailAndFirst");
    execute("Collection.edit", "row=0,viewObject=xava_view_section0_customers");
    assertEditable("customers.number");
    assertNoEditable("customers.name");  
    assertNoAction("Reference.createNew");
    assertNoAction("Reference.modify");
  }
      
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.