Package tests.jfun.yan.benchmark.models

Examples of tests.jfun.yan.benchmark.models.Foo


    new Benchmark("Spring: Create bean with Constructor Dependency Injection", LOOP){
      public void run() throws Exception {
        factory.getBean("foo");
      }
    }.start(true);
    Foo foo = (Foo)factory.getBean("foo");
    assertNotNull(foo.getBar());
  }
View Full Code Here


    new Benchmark("Nuts: Create bean with Constructor Dependency Injection", LOOP){
      public void run() throws Exception {
        yan.getInstance("foo");
      }
    }.start(true);
    Foo foo = (Foo)yan.getInstance("foo");
    assertNotNull(foo.getBar());
  }
View Full Code Here

  public void testCtorFactory() throws Exception{
    final jfun.yan.factory.Factory factory = yan.getFactory("foo");
     Benchmark bench = new Benchmark("Nuts: Constructor Injection with Factory", LOOP){
     
      public void run() throws Exception {
        final Foo foo = (Foo)factory.create();
        foo.noop();
      }
    };
    bench.start(true);
  }
View Full Code Here

TOP

Related Classes of tests.jfun.yan.benchmark.models.Foo

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.