Package org.ajax4jsf.tests

Examples of org.ajax4jsf.tests.MockDataModel


     * @see org.ajax4jsf.ajax.repeat.UIDataAdaptor#createDataModel()
     */
    protected ExtendedDataModel createDataModel() {

        // TODO Auto-generated method stub
        return new MockDataModel();
    }
View Full Code Here


     */
    public void testSetIterableDataModel() {
        createDataTree();
        data.setRowIndex(0);

        MockDataModel mockDataModel0 = new MockDataModel();

        adaptor.setExtendedDataModel(mockDataModel0);
        data.setRowIndex(1);

        MockDataModel mockDataModel1 = new MockDataModel();

        adaptor.setExtendedDataModel(mockDataModel1);
        data.setRowIndex(0);
        assertSame(mockDataModel0, adaptor.getExtendedDataModel());
        data.setRowIndex(1);
View Full Code Here

        data.setRowIndex(1);
        assertSame(mockDataModel1, adaptor.getExtendedDataModel());
    }

    public void testSetDataModel() {
        MockDataModel mockDataModel1 = new MockDataModel();

        adaptor.setExtendedDataModel(mockDataModel1);
        assertSame(mockDataModel1, adaptor.getExtendedDataModel());
    }
View Full Code Here

   * @see junit.framework.TestCase#setUp()
   */
  public void setUp() throws Exception {
    super.setUp();
    var = "var";
    originalModel = new MockDataModel();
    filterFields = new LinkedList<FilterField>();
    sortFields = new LinkedList<SortField2>();
    model = new ModifiableModel(originalModel, var);
    model.modify(filterFields, sortFields);
  }
View Full Code Here

   * Test method for {@link org.ajax4jsf.component.UIDataAdaptor#setExtendedDataModel(org.ajax4jsf.ajax.repeat.ExtendedDataModel)}.
   */
  public void testSetIterableDataModel() {
    createDataTree();
    data.setRowIndex(0);
    MockDataModel mockDataModel0 = new MockDataModel();
    adaptor.setExtendedDataModel(mockDataModel0);
    data.setRowIndex(1);
    MockDataModel mockDataModel1 = new MockDataModel();
    adaptor.setExtendedDataModel(mockDataModel1);
    data.setRowIndex(0);
    assertSame(mockDataModel0, adaptor.getExtendedDataModel());
    data.setRowIndex(1);
    assertSame(mockDataModel1, adaptor.getExtendedDataModel());
View Full Code Here

    data.setRowIndex(1);
    assertSame(mockDataModel1, adaptor.getExtendedDataModel());
  }
 
  public void testSetDataModel(){
    MockDataModel mockDataModel1 = new MockDataModel();
    adaptor.setExtendedDataModel(mockDataModel1);
    assertSame(mockDataModel1, adaptor.getExtendedDataModel());   
  }
View Full Code Here

  /**
   * Test method for {@link javax.faces.component.UIData#processDecodes(javax.faces.context.FacesContext)}.
   */
  public void testProcessDecodesFacesContext() {
    createDataTree();
    repeater.setValue(new MockDataModel());
//    enclosedRepeater.setValue(new MockDataModel());
    enclosedRepeater.processDecodes(facesContext);
    enclosedRepeater.setRowIndex(1);
    repeater.setRowIndex(1);
    System.out.println("Saved child state for external repeater ");
View Full Code Here

  /**
   * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
   */
  public void testProcessUpdatesFacesContext() {
    createDataTree();
    repeater.setValue(new MockDataModel());
//    enclosedRepeater.setValue(new MockDataModel());
    enclosedRepeater.processDecodes(facesContext);
    enclosedRepeater.processValidators(facesContext);
    enclosedRepeater.processUpdates(facesContext);
    enclosedRepeater.setRowIndex(1);
View Full Code Here

  /**
   * Test method for {@link javax.faces.component.UIData#processUpdates(javax.faces.context.FacesContext)}.
   */
  public void testProcessValidatorsFacesContext() {
    createDataTree();
    repeater.setValue(new MockDataModel());
//    enclosedRepeater.setValue(new MockDataModel());
    enclosedRepeater.processDecodes(facesContext);
    enclosedRepeater.processValidators(facesContext);
    enclosedRepeater.setRowIndex(1);
    repeater.setRowIndex(1);   
View Full Code Here

    assertEquals("0:2", child.getLocalValue());
  }
 
  public void testSetRowIndex() throws Exception {
    createDataTree();
    repeater.setValue(new MockDataModel());
    enclosedRepeater.setRowIndex(1);
    repeater.setRowIndex(1);
    child.setValue("1:1");
    repeater.setRowIndex(-1);
    enclosedRepeater.setRowIndex(-1);
View Full Code Here

TOP

Related Classes of org.ajax4jsf.tests.MockDataModel

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.