Search in sources :

Example 6 with Genie

use of org.osgl.inject.Genie in project java-di by osglworks.

the class GH26 method test.

@Test
public void test() {
    Genie genie = Genie.create();
    BeanSpec fooHolderSpec = BeanSpec.of(FooHolder.class, genie);
    BeanSpec fooSpec = fooHolderSpec.field("foo");
    BeanSpec dataSpec = fooSpec.field("data");
    eq(String.class, dataSpec.rawType());
}
Also used : Genie(org.osgl.inject.Genie) BeanSpec(org.osgl.inject.BeanSpec) Test(org.junit.Test)

Example 7 with Genie

use of org.osgl.inject.Genie in project java-di by osglworks.

the class Gh18 method test.

@Test
@Ignore
public void test() {
    Genie genie = Genie.create();
    BeanSpec spec = BeanSpec.of(int[].class, genie);
    eq(int.class, spec.typeParams().get(0));
}
Also used : Genie(org.osgl.inject.Genie) BeanSpec(org.osgl.inject.BeanSpec) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 Genie (org.osgl.inject.Genie)7 BeanSpec (org.osgl.inject.BeanSpec)4 Field (java.lang.reflect.Field)1 Ignore (org.junit.Ignore)1