libgdx - junit testing - how do I communicate with the Application thread?
问题 I am trying to do junit testing on a libgdx game, and have found this thread to be very helpful: Unit-testing of libgdx-using classes I have a test class similar to the following: public class BoardTest { private static Chess game; private static HeadlessApplication app; @BeforeClass public static void testStartGame() { game = new Chess(); final HeadlessApplicationConfiguration config = new HeadlessApplicationConfiguration(); config.renderInterval = 1f/60; // Likely want 1f/60 for 60 fps app