Package org.apache.wicket.injection

Examples of org.apache.wicket.injection.CompoundFieldValueFactory


   * Test array constructor
   */
  public void testArrayConstructor()
  {
    prepare(2);
    CompoundFieldValueFactory f = new CompoundFieldValueFactory(
        new IFieldValueFactory[] {fact[0], fact[1]});
    f.getFieldValue(field, this);
    verify(2);

    try
    {
      f = new CompoundFieldValueFactory((IFieldValueFactory[]) null);
      fail();
    }
    catch (IllegalArgumentException e)
    {
      // noop
View Full Code Here


  public void testListConstructor()
  {
    prepare(4);
    List list = Arrays.asList(new IFieldValueFactory[] {fact[0], fact[1], fact[2],
        fact[3]});
    CompoundFieldValueFactory f = new CompoundFieldValueFactory(list);
    f.getFieldValue(field, this);
    verify(4);

    try
    {
      f = new CompoundFieldValueFactory((List) null);
      fail();
    }
    catch (IllegalArgumentException e)
    {
      // noop
View Full Code Here

   * Test list constructor
   */
  public void testABConstructor()
  {
    prepare(2);
    CompoundFieldValueFactory f = new CompoundFieldValueFactory(fact[0], fact[1]);
    f.getFieldValue(field, this);
    verify(2);

    try
    {
      f = new CompoundFieldValueFactory(fact[0], null);
      fail();
    }
    catch (IllegalArgumentException e)
    {
      // noop
    }
    try
    {
      f = new CompoundFieldValueFactory(null, fact[1]);
      fail();
    }
    catch (IllegalArgumentException e)
    {
      // noop
View Full Code Here

    ctrl[2].expectAndReturn(fact[2].getFieldValue(field, this), new Object());
    ctrl[2].replay();
    ctrl[3].replay();
    List list = Arrays.asList(new IFieldValueFactory[] {fact[0], fact[1], fact[2],
        fact[3]});
    CompoundFieldValueFactory f = new CompoundFieldValueFactory(list);

    f.getFieldValue(field, this);

    verify(4);
  }
View Full Code Here

   * Test addFactory()
   */
  public void testAdd()
  {
    prepare(3);
    CompoundFieldValueFactory f = new CompoundFieldValueFactory(
        new IFieldValueFactory[] {fact[0], fact[1]});
    f.addFactory(fact[2]);
    f.getFieldValue(field, this);
    verify(3);

    try
    {
      f.addFactory(null);
      fail();
    }
    catch (IllegalArgumentException e)
    {
      // noop
View Full Code Here

TOP

Related Classes of org.apache.wicket.injection.CompoundFieldValueFactory

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.