Clean up asserts in tests

This commit is contained in:
Torbjørn Lunde Jensen 2020-02-03 15:32:11 +01:00
parent 4439e71dc5
commit 53e9b28b45
2 changed files with 46 additions and 15 deletions

31
mvn-app.iml Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx:1.9.9" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx-backend-lwjgl:1.9.9" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl.lwjgl:lwjgl:2.9.2" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl.lwjgl:lwjgl-platform:natives-windows:2.9.2" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl.lwjgl:lwjgl-platform:natives-linux:2.9.2" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl.lwjgl:lwjgl-platform:natives-osx:2.9.2" level="project" />
<orderEntry type="library" name="Maven: net.java.jinput:jinput:2.0.5" level="project" />
<orderEntry type="library" name="Maven: net.java.jutils:jutils:1.0.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: net.java.jinput:jinput-platform:natives-linux:2.0.5" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: net.java.jinput:jinput-platform:natives-windows:2.0.5" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: net.java.jinput:jinput-platform:natives-osx:2.0.5" level="project" />
<orderEntry type="library" name="Maven: org.lwjgl.lwjgl:lwjgl_util:2.9.2" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.jlayer:jlayer:1.0.1-gdx" level="project" />
<orderEntry type="library" name="Maven: org.jcraft:jorbis:0.0.17" level="project" />
<orderEntry type="library" name="Maven: com.badlogicgames.gdx:gdx-platform:natives-desktop:1.9.9" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
</component>
</module>

View File

@ -18,38 +18,38 @@ public class DrawableObjectTest {
@Test
public void getTextureMinArg() {
assertTrue(GameTexture.SLOW_TRANSPORT_BAND == testMinArg.getTexture());
assertSame(GameTexture.SLOW_TRANSPORT_BAND, testMinArg.getTexture());
}
@Test
public void getTextureMaxArg() {
assertTrue(GameTexture.ROBOT == testMaxArg.getTexture());
assertSame(GameTexture.ROBOT, testMaxArg.getTexture());
}
@Test
public void getXPositionMinArg() {
assertTrue(5 == testMinArg.getXPosition());
assertEquals(5, testMinArg.getXPosition());
}
@Test
public void getXPositionMaxArg() {
assertTrue(6 == testMaxArg.getXPosition());
assertEquals(6, testMaxArg.getXPosition());
}
@Test
public void getYPositionMinArg() {
assertTrue(5 == testMinArg.getYPosition());
assertEquals(5, testMinArg.getYPosition());
}
@Test
public void getYPositionMaxArg() {
assertTrue(6 == testMaxArg.getYPosition());
assertEquals(6, testMaxArg.getYPosition());
}
@Test
public void getWidthMinArg() {
assertTrue(64 == testMinArg.getWidth());
assertEquals(64, testMinArg.getWidth());
}
@Test
@ -59,42 +59,42 @@ public class DrawableObjectTest {
@Test
public void getHeightMinArg() {
assertTrue(64 == testMinArg.getHeight());
assertEquals(64, testMinArg.getHeight());
}
@Test
public void getHeightMaxArg() {
assertTrue(50 == testMaxArg.getHeight());
assertEquals(50, testMaxArg.getHeight());
}
@Test
public void getRotationMinArg() {
assertTrue(0 == testMinArg.getRotation());
assertEquals(0, testMinArg.getRotation());
}
@Test
public void getRotationMaxArg() {
assertTrue(90 == testMaxArg.getRotation());
assertEquals(90, testMaxArg.getRotation());
}
@Test
public void flipXMinArg() {
assertTrue(false == testMinArg.flipX());
assertFalse(testMinArg.flipX());
}
@Test
public void flipXMaxArg() {
assertTrue(true == testMaxArg.flipX());
assertTrue(testMaxArg.flipX());
}
@Test
public void flipYMinArg() {
assertTrue(false == testMinArg.flipY());
assertFalse(testMinArg.flipY());
}
@Test
public void flipYMaxArg() {
assertTrue(true == testMaxArg.flipY());
assertTrue(testMaxArg.flipY());
}
}