Examples of MyBean


Examples of tests.jfun.models.MyBean

      .verifier("verify")
      .manage(mybean);
      yan.registerValue(new Short((short)1));
      yan.registerValue(Boolean.valueOf(true));
      yan.registerComponent("target", mybean);
      MyBean bean = (MyBean)yan.getInstance("target");
      assertTrue(bean.is1());
      try{
        man.verify();
      }
      catch(IllegalStateException e){
        return;
View Full Code Here

Examples of tests.jfun.models.MyBean

        });
      yan.registerValue(new Short((short)1));
      yan.registerValue(Boolean.valueOf(true));
      yan.registerComponent("target", mybean);
      try{
        MyBean bean = (MyBean)yan.getInstance("target");
      }
      catch(ComponentInstantiationException e){
        return;
      }
      fail("should have failed in verification");
View Full Code Here

Examples of tests.jfun.models.MyBean

      yan.registerComponent("target",
          injector.bind(Monad.instantiator())
          .factory(Injector.class)
      );
      yan.registerValue("apple");
      MyBean mbean = new MyBean();
      Injector inj = (Injector)yan.getInstance("target");
      inj.inject(mbean);
      assertEquals("apple", mbean.getName());
    }
View Full Code Here

Examples of tests.jfun.models.MyBean

      yan.registerComponent("target",
          new InjectorHelper()
          .getInjectorComponent(Injector.class, injection)
      );
      yan.registerValue("apple");
      MyBean mbean = new MyBean();
      Injector inj = (Injector)yan.getInstance("target");
      inj.inject(mbean);
      assertEquals("apple", mbean.getName());
    }
View Full Code Here

Examples of tests.jfun.models.MyBean

      yan.registerComponent("dao", dao);
      yan.registerValue(new Integer(10));
      yan.registerValue(new char[]{'a','b'});
      BankAccountDao mdao = (BankAccountDao)yan.getInstance("dao");
      assertEquals(mdao, mdao);
      MyBean mbean = mdao.getMyBean(1);
      assertEquals("apple", mbean.getName());
      BankAccount account = mdao.getAccount("a");
      assertEquals('a', account.getChar(0));
      assertEquals('b', account.getChar(1));
      assertEquals("apple", account.getId());
      assertEquals(10, account.getBalance());
View Full Code Here

Examples of tests.jfun.models.MyBean

          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
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.