title: Unit-testing of libgdx-using classes
body: <p>I'm writing a game over libgdx; I'm using the junit framework to simplify unit-testing my code.
  Now there's part of the code (a map generator, a class converting my own map format into TiledMap...) which I need to test thoroughly, but it uses libgdx code: from file handling to asset loading.
  I'm not planning to test the actual graphical output, or the game itself, in this way: but I want to test the single components (calculation, asset access...) to avoid blatant errors.</p>
  <p>I've tried to do something like this in the &quot;setUpBeforeClass&quot; method:</p>
  <pre><code>    LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
      cfg.useGL20 = true;
      cfg.width = 480;
      cfg.height = 320;
      cfg.resizable = true;
      LwjglApplication app = new LwjglApplication( new TestApplicationListener(), cfg);
  </code></pre>
  <p>And calling within tearDownAfterClass():</p>
  <pre><code>    Gfx.app.exit()
  </code></pre>
  <p>But it does create a window I do not need, and seems overkill when all I need is the file handling initialized. Is there a better way to initialize the libGDX components without creating an entire application object?
  Thanks.</p>
  <h3>EDIT</h3>
  <p>Going back over it (thanks to Sam in the comments), I realize GL access is needed (loading assets requires it), but this approach does not seem to work: the graphic library does not seem to be initialized. GDX documentation hasn't helped. Any clue?</p>