/*
 * Copyright (c) 2017. Licensed under the Apache License 2.0.
 * For full copyright, licensing, and sourcing information,
 * please refer to the CodeCarnage GitHub repository's README.md file
 * (found on https://github.com/j3kstrum/CodeCarnage).
 */

package engine.core;

import static org.junit.Assert.assertTrue;

public class EngineTest {

    private int two;
    private Engine e;

    @org.junit.Before
    public void setUp() throws Exception {
        e = new Engine(null);
    }

    @org.junit.Test
    public void shutdown() throws Exception {
        e.startGame();
        e.shutdown();
        assertTrue(true);
    }

    @org.junit.Test
    public void shutdown1() throws Exception {
        e.startGame();
        e.shutdown(true);
        assertTrue(true);
    }

    @org.junit.Test
    public void shutdown2() throws Exception {
        e.startGame();
        e.shutdown(false);
        assertTrue(true);
    }

    @org.junit.Test
    public void startGame() throws Exception {
        e.startGame();
        assertTrue(true);
    }

    @org.junit.Test
    public void stopGame() throws Exception {
        e.startGame();
        e.stopGame();
        assertTrue(true);
    }

    @org.junit.Test
    public void onePlusOne() throws Exception {
        two = 1 + 1;
        assertTrue(two == 2);
    }
}

@@ -270,16 +270,60 @@
 .core;%0A%0A
+import static org.junit.Assert.assertFalse;%0A
 import s
@@ -357,16 +357,16 @@
 rtTrue;%0A
-
 %0Apublic 
@@ -389,29 +389,8 @@
  %7B%0A%0A
-    private int two;%0A
     
@@ -625,34 +625,8 @@
 ();%0A
-        assertTrue(true);%0A
     
@@ -748,34 +748,8 @@
 e);%0A
-        assertTrue(true);%0A
     
@@ -872,34 +872,8 @@
 e);%0A
-        assertTrue(true);%0A
     
@@ -969,34 +969,8 @@
 ();%0A
-        assertTrue(true);%0A
     
@@ -1087,34 +1087,8 @@
 ();%0A
-        assertTrue(true);%0A
     
@@ -1130,88 +1130,1419 @@
 oid 
-onePlusOne() throws Exception %7B%0A        two = 1 + 1;%0A        assertTrue(two == 2
+cleanup() throws Exception %7B%0A        e.startGame();%0A        e.stopGame();%0A        e.cleanup();%0A    %7D%0A%0A    @org.junit.Test%0A    public void gameRunning() throws Exception %7B%0A        e.startGame();%0A        assertTrue(e.isRunning());%0A    %7D%0A%0A    @org.junit.Test%0A    public void gameStoppedNotRunning() throws Exception %7B%0A        e.startGame();%0A        e.stopGame();%0A        assertFalse(e.isRunning());%0A    %7D%0A%0A    @org.junit.Test%0A    public void testValidWait() throws Exception %7B%0A        e.performWait(System.currentTimeMillis() - Engine.TICK_TIME / 10);%0A    %7D%0A%0A    @org.junit.Test%0A    public void testBarelyValidWait() throws Exception %7B%0A        e.performWait(System.currentTimeMillis() - Engine.TICK_TIME * 2 / 3);%0A    %7D%0A%0A    @org.junit.Test%0A    public void testInvalidWait() throws Exception %7B%0A        e.performWait(System.currentTimeMillis() - Engine.TICK_TIME * 2);%0A    %7D%0A%0A    @org.junit.Test%0A    public void interruptEngineWait() throws Exception %7B%0A        Thread t = new Thread(() -%3E e.performWait(System.currentTimeMillis() + 10000));%0A        t.start();%0A        Thread.sleep(100);%0A        t.interrupt();%0A    %7D%0A%0A    @org.junit.Test%0A    public void properSleepDuration() throws Exception %7B%0A        long curtime = System.currentTimeMillis();%0A        long endtime = e.performWait(curtime);%0A        assertTrue(endtime - curtime %3E Engine.TICK_TIME - 10);%0A        assertTrue(endtime - curtime %3C Engine.TICK_TIME + 10
 );%0A 

Add more engine coverage