// Path: workspace/Angr/src/fi/hbp/angr/BodyFactory.java
// public class BodyFactory {
//     private final GameStage stage;
//     private final InputMultiplexer inputMultiplexer;
//     private final BodyEditorLoader bel;
//     protected AssetContainer asGrenade = new AssetContainer();
//     protected AssetContainer asBox = new AssetContainer();
//     protected Hans.HansAssetContainer hac = new Hans.HansAssetContainer();
// 
//     private static boolean preloaded = false;
// 
//     /**
//      * Add assets of this class to a preload list.
//      */
//     public static void preload() {
//         if (!preloaded) {
//             Grenade.preload();
//             Box.preload();
//             Hans.preload();
// 
//             preloaded = true;
//         }
//     }
// 
//     /* TODO Should the map/level tell what assets it will need? */
// 
//     /* TODO Add a function to unload unneeded assets? */
// 
//     /**
//      * Constructor for body factory.
//      * @param stage the game stage.
//      * @param inputMultiplexer input multiplexer for adding new input processor.
//      */
//     public BodyFactory(GameStage stage, InputMultiplexer inputMultiplexer) {
//         this.stage = stage;
//         this.inputMultiplexer = inputMultiplexer;
// 
//         bel = new BodyEditorLoader(Gdx.files.internal("models.json"));
// 
//         /* Initialize assets */
//         Grenade.initAssets(asGrenade, bel);
//         Box.initAssets(asBox, bel);
//         Hans.initAssets(hac, bel);
//     }
// 
//     /**
//      * Get world used by body factory and game stage
//      * @return Box2D world.
//      */
//     public World getWorld() {
//         return stage.getWorld();
//     }
// 
//     /**
//      * Spawns a new grenade to the game stage
//      * @param x position on x axis.
//      * @param y position on y axis.
//      * @param angle body angle.
//      * @return actor of the new game object.
//      */
//     public Actor spawnGrenade(float x, float y, float angle) {
//         Grenade actor = new Grenade(stage, bel, asGrenade, x, y, angle);
//         inputMultiplexer.addProcessor(actor);
//         stage.addActor(actor);
//         ((GameStage)stage).setCameraFollow(((Grenade)actor).getBody());
//         return actor;
//     }
// 
//     /**
//      * Spawns a new box t othe game stage
//      * @param x Position on x axis.
//      * @param y Position on y axis.
//      * @param angle Body angle.
//      * @return Actor of the new game object.
//      */
//     public Actor spawnBox(float x, float y, float angle) {
//         Box actor = new Box(stage, bel, asBox, x, y, angle);
//         stage.addActor(actor);
//         return actor;
//     }
// 
//     /**
//      * Spawns a new Hans player model to the game stage
//      * @param x Position on x axis.
//      * @param y Position on y axis.
//      * @param angle Body angle.
//      * @return Actor of the new game object.
//      */
//     public Actor spawnHans(float x, float y, float angle) {
//         Hans actor = new Hans(stage, bel, hac, x, y, angle);
//         inputMultiplexer.addProcessor(actor);
//         stage.addActor(actor);
//         return actor;
//     }
// }
// 
// Path: workspace/Angr/src/fi/hbp/angr/G.java
// public class G {
//     /**
//      * Debug mode
//      *
//      * If this is set to true game will output some additional data and
//      * enables debug camera functionality. Debug camera is enabled by
//      * pressing d while in the game stage.
//      */
//     public static final boolean DEBUG = false;
// 
//     /**
//      * Global static assets manager
//      *
//      * @note As there is no universal support for threaded  access to the
//      * OpenGL context from multiple threads and as its exclusively prohibited
//      * in gdx a global asset manager is needed. This asset manager makes it
//      * easier to load new assets asynchronously without blocking rendering.
//      */
//     private static AssetManager assetManager = new AssetManager();
// 
//     /**
//      * Conversion from Box2D to the sprite relative/pixel coordinates
//      */
//     public static final float BOX_TO_WORLD = 100.0f;
// 
//     /**
//      * Conversion from sprite relative/pixel coordinates to Box2D coordinates
//      */
//     public static final float WORLD_TO_BOX = 1.0f / BOX_TO_WORLD;
// 
//     /**
//      * Get global static assets manager
//      * @return Global asset manager.
//      */
//     public static AssetManager getAssetManager() {
//         return assetManager;
//     }
// 
//     /**
//      * Game scoreboard
//      */
//     public static Scoreboard scoreboard = null;
// 
//     /**
//      * Game pause button
//      */
//     public static int pauseButton = Keys.P;
//     public static int pauseButton1 = Keys.BACK;
// }


import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.badlogic.gdx.InputMultiplexer;
import fi.hbp.angr.BodyFactory;
import fi.hbp.angr.G;
/**
 *
 */
package fi.hbp.angr;





/**
 * @author hbp
 *
 */
public class BodyFactoryTest {
    static InputMultiplexer inputMultiplexer;
// Path: workspace/Angr/src/fi/hbp/angr/BodyFactory.java
// public class BodyFactory {
//     private final GameStage stage;
//     private final InputMultiplexer inputMultiplexer;
//     private final BodyEditorLoader bel;
//     protected AssetContainer asGrenade = new AssetContainer();
//     protected AssetContainer asBox = new AssetContainer();
//     protected Hans.HansAssetContainer hac = new Hans.HansAssetContainer();
// 
//     private static boolean preloaded = false;
// 
//     /**
//      * Add assets of this class to a preload list.
//      */
//     public static void preload() {
//         if (!preloaded) {
//             Grenade.preload();
//             Box.preload();
//             Hans.preload();
// 
//             preloaded = true;
//         }
//     }
// 
//     /* TODO Should the map/level tell what assets it will need? */
// 
//     /* TODO Add a function to unload unneeded assets? */
// 
//     /**
//      * Constructor for body factory.
//      * @param stage the game stage.
//      * @param inputMultiplexer input multiplexer for adding new input processor.
//      */
//     public BodyFactory(GameStage stage, InputMultiplexer inputMultiplexer) {
//         this.stage = stage;
//         this.inputMultiplexer = inputMultiplexer;
// 
//         bel = new BodyEditorLoader(Gdx.files.internal("models.json"));
// 
//         /* Initialize assets */
//         Grenade.initAssets(asGrenade, bel);
//         Box.initAssets(asBox, bel);
//         Hans.initAssets(hac, bel);
//     }
// 
//     /**
//      * Get world used by body factory and game stage
//      * @return Box2D world.
//      */
//     public World getWorld() {
//         return stage.getWorld();
//     }
// 
//     /**
//      * Spawns a new grenade to the game stage
//      * @param x position on x axis.
//      * @param y position on y axis.
//      * @param angle body angle.
//      * @return actor of the new game object.
//      */
//     public Actor spawnGrenade(float x, float y, float angle) {
//         Grenade actor = new Grenade(stage, bel, asGrenade, x, y, angle);
//         inputMultiplexer.addProcessor(actor);
//         stage.addActor(actor);
//         ((GameStage)stage).setCameraFollow(((Grenade)actor).getBody());
//         return actor;
//     }
// 
//     /**
//      * Spawns a new box t othe game stage
//      * @param x Position on x axis.
//      * @param y Position on y axis.
//      * @param angle Body angle.
//      * @return Actor of the new game object.
//      */
//     public Actor spawnBox(float x, float y, float angle) {
//         Box actor = new Box(stage, bel, asBox, x, y, angle);
//         stage.addActor(actor);
//         return actor;
//     }
// 
//     /**
//      * Spawns a new Hans player model to the game stage
//      * @param x Position on x axis.
//      * @param y Position on y axis.
//      * @param angle Body angle.
//      * @return Actor of the new game object.
//      */
//     public Actor spawnHans(float x, float y, float angle) {
//         Hans actor = new Hans(stage, bel, hac, x, y, angle);
//         inputMultiplexer.addProcessor(actor);
//         stage.addActor(actor);
//         return actor;
//     }
// }
// 
// Path: workspace/Angr/src/fi/hbp/angr/G.java
// public class G {
//     /**
//      * Debug mode
//      *
//      * If this is set to true game will output some additional data and
//      * enables debug camera functionality. Debug camera is enabled by
//      * pressing d while in the game stage.
//      */
//     public static final boolean DEBUG = false;
// 
//     /**
//      * Global static assets manager
//      *
//      * @note As there is no universal support for threaded  access to the
//      * OpenGL context from multiple threads and as its exclusively prohibited
//      * in gdx a global asset manager is needed. This asset manager makes it
//      * easier to load new assets asynchronously without blocking rendering.
//      */
//     private static AssetManager assetManager = new AssetManager();
// 
//     /**
//      * Conversion from Box2D to the sprite relative/pixel coordinates
//      */
//     public static final float BOX_TO_WORLD = 100.0f;
// 
//     /**
//      * Conversion from sprite relative/pixel coordinates to Box2D coordinates
//      */
//     public static final float WORLD_TO_BOX = 1.0f / BOX_TO_WORLD;
// 
//     /**
//      * Get global static assets manager
//      * @return Global asset manager.
//      */
//     public static AssetManager getAssetManager() {
//         return assetManager;
//     }
// 
//     /**
//      * Game scoreboard
//      */
//     public static Scoreboard scoreboard = null;
// 
//     /**
//      * Game pause button
//      */
//     public static int pauseButton = Keys.P;
//     public static int pauseButton1 = Keys.BACK;
// }


// Path: workspace/Angr-desktop/test/fi/hbp/angr/BodyFactoryTest.java
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.badlogic.gdx.InputMultiplexer;
import fi.hbp.angr.BodyFactory;
import fi.hbp.angr.G;

/**
 *
 */
package fi.hbp.angr;





/**
 * @author hbp
 *
 */
public class BodyFactoryTest {
    static InputMultiplexer inputMultiplexer;
    BodyFactory bf;