Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated PIT report, class diagram. Added more tests
- Loading branch information
Showing
34 changed files
with
7,769 additions
and
1,842 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This is a comment | ||
# This is a comment as well | ||
# These are all comments | ||
# and | ||
# they | ||
# shouldn't | ||
# show | ||
# up | ||
# in-game! | ||
You picked up a golden key! | ||
You are now in possession of a golden key! | ||
You found a shiny golden key! | ||
You now hold a fancy golden key! | ||
You now have a golden key! |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
DungeonCrawler/src/test/java/com/matoking/dungeoncrawler/state/GameLogTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package com.matoking.dungeoncrawler.state; | ||
|
||
import java.util.ArrayList; | ||
import org.junit.After; | ||
import org.junit.AfterClass; | ||
import org.junit.Before; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* | ||
* @author matoking | ||
*/ | ||
public class GameLogTest { | ||
public GameLog gameLog; | ||
|
||
public GameLogTest() { | ||
} | ||
|
||
@BeforeClass | ||
public static void setUpClass() { | ||
} | ||
|
||
@AfterClass | ||
public static void tearDownClass() { | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
this.gameLog = new GameLog(new GameState()); | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
} | ||
|
||
@Test | ||
public void testLogsCreatedCorrectly() { | ||
this.gameLog.addMessage("Test message One"); | ||
this.gameLog.addMessage("Test message Two"); | ||
|
||
ArrayList<String> messages = this.gameLog.getMessages(); | ||
|
||
assertEquals(messages.get(0), "Test message One"); | ||
assertEquals(messages.get(1), "Test message Two"); | ||
} | ||
|
||
@Test | ||
public void testLogsTruncatedCorrectly() { | ||
for (int i=0; i < 25; i++) { | ||
this.gameLog.addMessage(String.format("%d", i)); | ||
} | ||
|
||
ArrayList<String> messages = this.gameLog.getMessages(); | ||
|
||
assertEquals(messages.get(0), "5"); | ||
assertEquals(messages.get(19), "24"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
,matoking,matoking-Z87-HD3,29.01.2015 17:07,file:///home/matoking/.config/libreoffice/4; |
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.