Package test.container.X

Examples of test.container.X.Single


    assertNotSame(o1, o2);
    assertSame(o.con, o2.con);
    assertSame(o.name, o2.name);
    assertEquals(o.new_, o2.new_);

    Single p = con.get(Single.class);
    New2 o3 = con.get(New2.class);
    assertSame(o.con, o3.con);
    assertSame(o.name, o3.name);
    assertEquals(o.new_, o3.new_);
    assertSame(p, o3.p);
View Full Code Here


  }

  @Test
  public void single()
  {
    Single o0 = con.getNew(Single.class);
    assertNotSame(o0, o0.s);

    Single o = con.get(Single.class);
    assertSame(Single.class, o.getClass());
    assertSame(o0.s, o);
    assertSame(o, o.s);
    assertNotNull(o.n);

    Single o1 = con.get(Single.class);
    assertSame(o, o1);
    assertNotSame(o.n, con.get(New.class));
    assertNotSame(o1, con.getNew(Single.class));

    Single o2 = con2.get(Single.class);
    assertNotSame(o0, o2);
    assertNotSame(o, o2);
    assertNotSame(o.n, o2.n);

    Single2 oo = con.get(Single2.class);
View Full Code Here

  @Test
  public void set()
  {
    New2 o0 = con.get(New2.class);
    assertNull(o0.t);
    Single o1 = con.get(Single.class);
    assertNull(o1.t);

    Set o2 = con.get(Set.class);
    assertNull(o2);
    o2 = new Set();
    assertSame(o2, con.set(Set.class, o2));
    assertSame(o2, con.get(Set.class));
    assertSame(o2, con.getNew(Set.class));
    assertNull(o2.noInject);

    New2 o3 = con.get(New2.class);
    assertSame(o2, o3.t);
    Single o4 = con.get(Single.class);
    assertNull(o4.t);
    Single o5 = con.getNew(Single.class);
    assertSame(o2, o5.t);

    conLazy.set(Set.class, o2);
    assertSame(o2, conLazy.get(Single.class).t);
    conLazy.set(Set.class, null);
View Full Code Here

TOP

Related Classes of test.container.X.Single

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.