use of com.builtbroken.mc.lib.json.loading.JsonProcessorInjectionMap in project Engine by VoltzEngine-Project.
the class TestProcessorInjection method testField.
@Test
public void testField() {
JsonProcessorInjectionMap map = new JsonProcessorInjectionMap(InjectionTestClass.class);
InjectionTestClass object = new InjectionTestClass();
assertTrue(map.handle(object, "key", "String"));
assertEquals("String", object.key);
}
use of com.builtbroken.mc.lib.json.loading.JsonProcessorInjectionMap in project Engine by VoltzEngine-Project.
the class TestProcessorInjection method testDouble.
@Test
public void testDouble() {
JsonProcessorInjectionMap map = new JsonProcessorInjectionMap(InjectionTestClass.class);
InjectionTestClass object = new InjectionTestClass();
assertTrue(map.handle(object, "d", 1.1));
assertEquals(1.1, object.d);
assertTrue(map.handle(object, "d2", 2.2));
assertEquals(2.2, object.d);
}
use of com.builtbroken.mc.lib.json.loading.JsonProcessorInjectionMap in project Engine by VoltzEngine-Project.
the class TestProcessorInjection method testShort.
@Test
public void testShort() {
JsonProcessorInjectionMap map = new JsonProcessorInjectionMap(InjectionTestClass.class);
InjectionTestClass object = new InjectionTestClass();
assertTrue(map.handle(object, "s", (short) 1));
assertEquals(1, object.s);
assertTrue(map.handle(object, "s2", (short) 2));
assertEquals(2, object.s);
}
use of com.builtbroken.mc.lib.json.loading.JsonProcessorInjectionMap in project Engine by VoltzEngine-Project.
the class TestProcessorInjection method testInteger.
@Test
public void testInteger() {
JsonProcessorInjectionMap map = new JsonProcessorInjectionMap(InjectionTestClass.class);
InjectionTestClass object = new InjectionTestClass();
assertTrue(map.handle(object, "i", 1));
assertEquals(1, object.i);
assertTrue(map.handle(object, "i3", 2));
assertEquals(2, object.i);
assertTrue(map.handle(object, "i2", 3));
assertEquals(3, object.i2);
assertTrue(map.handle(object, "i4", 4));
assertEquals(4, object.i2);
}
use of com.builtbroken.mc.lib.json.loading.JsonProcessorInjectionMap in project Engine by VoltzEngine-Project.
the class TestProcessorInjection method testByte.
@Test
public void testByte() {
JsonProcessorInjectionMap map = new JsonProcessorInjectionMap(InjectionTestClass.class);
InjectionTestClass object = new InjectionTestClass();
assertTrue(map.handle(object, "b", (byte) 1));
assertEquals(1, object.b);
assertTrue(map.handle(object, "b2", (byte) 2));
assertEquals(2, object.b);
}
Aggregations