Examples of verifyComponent()


Examples of de.hybris.yfaces.component.YComponentInfo.verifyComponent()

   */
  private YComponentInfo getYComponentInfo() {
    // validation
    YComponentInfo cmpInfo = new YComponentInfo(getId(), getVarName(), this.getSpec(), this
        .getImpl());
    Set<ERROR_STATE> errors = new HashSet<ERROR_STATE>(cmpInfo.verifyComponent());
    errors.remove(ERROR_STATE.VIEW_ID_NOT_SPECIFIED);
    errors.remove(ERROR_STATE.SPEC_IS_MISSING);

    String errorString = ERROR_STATE.getFormattedErrorMessage(errors, cmpInfo, null);
    if (errorString != null) {
View Full Code Here

Examples of de.hybris.yfaces.component.YComponentInfo.verifyComponent()

      if (count >= 0) {
        log.info("Asserting: " + cmp);
        log.info("Expecting: " + expected);
        cmpInfo = cmpFac.createComponentInfo(cmp);
        Set<ERROR_STATE> errors = cmpInfo.verifyComponent();
        assertEquals(new HashSet<ERROR_STATE>(expected), errors);
      }
    }
  }
View Full Code Here

Examples of jfun.yan.Container.verifyComponent()

      .withProperties(new String[]{"1","name","short","nums"},
          new Component[]{Components.value(false),
          Components.value("Ent"),
          Components.value((short)-1),
          Components.value(new int[]{1,2,3,4})});
      yan.verifyComponent(target);
      final MyBean mb = (MyBean)yan.instantiateComponent(target);
      assertTrue(mb.is1());
      assertEquals("Ent", mb.getName());
      assertEquals((short)-1, mb.getShort());
      assertEquals(3, mb.getNums().length);
View Full Code Here

Examples of jfun.yan.Container.verifyComponent()

  public void testArrayComponent(){
    final Container yan = createYanContainer();
    yan.registerComponent("target",
        Components.array(
        new Component[]{Components.value("hello"), Components.value("world")}));
    assertEquals(String[].class, yan.verifyComponent(
        yan.getComponent("target")));
    String[] arr = (String[])yan.getInstance("target");
    assertEquals(2, arr.length);
    assertEquals("hello", arr[0]);
    assertEquals("world", arr[1]);
View Full Code Here

Examples of jfun.yan.Container.verifyComponent()

  public void testArrayComponentWithDynamicBoundComponent(){
    final Container yan = createYanContainer();
    yan.registerComponent("target", Components.array(
        new Component[]{Components.value("hello"), Components.useKey("you")}));
    yan.registerValue("you", "world");
    assertEquals(Object[].class, yan.verifyComponent(yan.getComponent("target")));
    Object[] arr = (Object[])yan.getInstanceOfType(Object[].class);
    assertEquals(2, arr.length);
    assertEquals("hello", arr[0]);
    assertEquals("world", arr[1]);
  }
View Full Code Here

Examples of jfun.yan.Container.verifyComponent()

    yan.registerComponent(
        Components.array(
        new Component[]{Components.value("hello"), Components.useKey("you")}
        , CharSequence.class));
    yan.registerValue("you", "world");
    assertEquals(CharSequence[].class, yan.verifyComponent(yan.getComponent(CharSequence[].class)));
    CharSequence[] arr = (CharSequence[])yan.getInstanceOfType(CharSequence[].class);
    assertFalse(arr instanceof String[]);
    assertEquals(2, arr.length);
    assertEquals("hello", arr[0]);
    assertEquals("world", arr[1]);
View Full Code Here

Examples of jfun.yan.Container.verifyComponent()

    final Container yan = createYanContainer();
    yan.registerComponent("target", Components.array(
        new Component[]{Components.value("hello"),
            Components.useKey("age")}));
    yan.registerValue("age", new Integer(20));
    assertEquals(Object[].class, yan.verifyComponent(yan.getComponent("target")));
    Object[] arr = (Object[])yan.getInstanceOfType(Object[].class);
   
    assertEquals(2, arr.length);
    assertEquals("hello", arr[0]);
    assertEquals(new Integer(20), arr[1]);
View Full Code Here

Examples of jfun.yan.Container.verifyComponent()

    final Container yan = createYanContainer();
    yan.registerComponent(Components.list(new Creator[]{
        Components.value("hello"), Components.value("world")}
    ));
    assertEquals(java.util.ArrayList.class,
        yan.verifyComponent(yan.getComponentOfType(java.util.List.class)));
    final java.util.List list = (java.util.List)yan.getInstanceOfType(java.util.ArrayList.class);
    assertEquals(2, list.size());
    assertEquals("hello", list.get(0));
    assertEquals("world", list.get(1));
  }
View Full Code Here

Examples of jfun.yan.containers.DefaultContainer.verifyComponent()

        if ((getComponentAdapterNature() & VERIFYING) > 0) {
            final Container yan = new DefaultContainer();
            final Component component = prepVER_verificationFails(yan);
            //assertSame(getComponentAdapterType(), component.getClass());
            try {
                yan.verifyComponent(component);
                fail("YanException expected");
            } catch (YanException e) {
            } catch (Exception e) {
                fail("YanException expected");
            }
View Full Code Here

Examples of org.apache.excalibur.containerkit.verifier.ComponentVerifier.verifyComponent()

    {
        try
        {
            final ComponentVerifier verifier = new ComponentVerifier();
            setupLogger( verifier );
            verifier.
                verifyComponent( name, clazz, interfaces );
        }
        catch( VerifyException ve )
        {
            //ignore as the above will print out
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.