Skip to content

Commit

Permalink
Update config tests
Browse files Browse the repository at this point in the history
  • Loading branch information
INCENDE committed Oct 28, 2016
1 parent 56c1558 commit 79cc1d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/main/java/seedu/agendum/commons/core/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class Config {
private String toDoListFilePath = DEFAULT_SAVE_LOCATION;
private String toDoListName = "MyToDoList";


public Config() {
}

Expand Down
17 changes: 10 additions & 7 deletions src/test/java/seedu/agendum/commons/core/ConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ public class ConfigTest {

@Test
public void toString_defaultObject_stringReturned() {
String defaultConfigAsString = "App title : Agendum\n" +
"Current log level : INFO\n" +
"Preference file Location : preferences.json\n" +
"Local data file location : data/todolist.xml\n" +
"ToDoList name : MyToDoList";

assertEquals(defaultConfigAsString, new Config().toString());
Config config = new Config();

StringBuilder sb = new StringBuilder();
sb.append("App title : Agendum");
sb.append("\nCurrent log level : INFO");
sb.append("\nPreference file Location : " + Config.DEFAULT_USER_PREFS_FILE);
sb.append("\nLocal data file location : " + Config.DEFAULT_SAVE_LOCATION);
sb.append("\nToDoList name : MyToDoList");

assertEquals(sb.toString(), new Config().toString());
}

@Test
Expand Down

0 comments on commit 79cc1d6

Please sign in to comment.