test/infinity/ecs/core/EntityTest.java
/**
     * Test if the entity manager creates unique Entitys with unique ids.
     */
Test if the entity manager creates unique Entitys with unique ids.
Test if the entity manager creates unique Entitys with unique ids .
@Test
    public void testUniqueEntity() {
        HashSet<Integer> ids = new HashSet<>();
        for(int i = 0; i<100000; i++){
            _entity = _manager.createEntity();
            assertTrue("A Entity is not unique",_entitys.add(_entity));
            assertTrue("A Entity has a ID that is not unique!",
                    ids.add(_entity.getId()));
        }
    }
@ Test public void testUniqueEntity ( ) { HashSet < Integer > ids = new HashSet < > ( ) ; for ( int i = 0 ; i < 100000 ; i ++ ) { _entity = _manager . createEntity ( ) ; assertTrue ( "A Entity is not unique" , _entitys . add ( _entity ) ) ; assertTrue ( "A Entity has a ID that is not unique!" , ids . add ( _entity . getId ( ) ) ) ; } }
Test if the entity manager creates unique Entitys with unique ids.
Test if the entity manager creates unique Entitys with unique ids .