Package com.artemis

Examples of com.artemis.World.initialize()


public class EmptyPackedTest {
 
  @Test @SuppressWarnings("static-method")
  public void empty_packed_shouldnt_reference_bytbuffer() throws Exception {
    World world = new World();
    world.initialize();
   
    Entity e1 = world.createEntity();
    EmptyPacked empty = e1.createComponent(EmptyPacked.class);
    assertEquals(PackedComponent.class, empty.getClass().getSuperclass());
  }
View Full Code Here


public class PooledAllFieldsTest {

  @Test @SuppressWarnings("static-method")
  public void pooled_class_transformation() throws Exception {
    World world = new World();
    world.initialize();
   
    Entity e = world.createEntity();
    PooledAllFields pooled = e.createComponent(PooledAllFields.class);
    assertEquals(PooledComponent.class, pooled.getClass().getSuperclass());
   
View Full Code Here

public class PackedWeaverGrowTest {
 
  @Test @SuppressWarnings("static-method")
  public void packed_weaver_components_grow_correctly() throws Exception {
    World world = new World();
    world.initialize();
   
    for (int i = 0; 2048 > i; i++)
      createEntity(world);
   
    Entity last = createEntity(world);
View Full Code Here

public class PolyConstructorTest {
 
  @Test @SuppressWarnings("static-method")
  public void pooled_class_with_many_constructors() throws Exception {
    World world = new World();
    world.initialize();
   
    Entity e1 = world.createEntity();
    PolyConstructor pooled1 = e1.createComponent(PolyConstructor.class);
    assertEquals(PooledComponent.class, pooled1.getClass().getSuperclass());
View Full Code Here

 
  @Test
  public void plain_profiled_system_invoked_during_process() {
    World world = new World();
    world.setSystem(new ProfiledSystem());
    world.initialize();
   
    Assert.assertNull(
        ProfiledSystem.class.getAnnotation(Profile.class));
   
    world.process();
View Full Code Here

 
  @Test
  public void multiple_exit_points_profiled_system() {
    World world = new World();
    world.setSystem(new ProfiledSystemB());
    world.initialize();
   
    Assert.assertNull(
        ProfiledSystemB.class.getAnnotation(Profile.class));
   
    world.process();
View Full Code Here

    Method m = processMethod(OptimizedSystemAdditional.class);
    assertEquals(PRIVATE, m.getModifiers() & PRIVATE);

    World world = new World();
    world.setSystem(new OptimizedSystemAdditional());
    world.initialize();
  }

  private static Method processMethod(Class<?> klazz) {
    try {
      return klazz.getDeclaredMethod("process", Entity.class);
View Full Code Here

  @Test
  public void test_interval_delta() {
   
    World world = new World();
    IntervalSystem es = world.setSystem(new IntervalSystem());
    world.initialize();
   
    world.delta = 1.1f;
    world.process();
    assertEquals(1.1, es.getIntervalDelta(), ACC);
   
View Full Code Here

public class UuidEntityManagerTest {
 
  @Test(expected=MundaneWireException.class)
  public void throw_exception_missing_uuid_manager() {
    World world = new World();
    world.initialize();
   
    Entity entity = world.createEntity();
   
    Assert.assertNotNull(entity.getUuid());
  }
View Full Code Here

 
  @Test
  public void uuid_assigned() {
    World world = new World();
    world.setManager(new UuidEntityManager());
    world.initialize();
   
    Entity entity = world.createEntity();
   
    assertNotNull(entity.getUuid());
    UUID uuid1 = entity.getUuid();
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.