Skip to content

Commit

Permalink
Merge pull request #185 from AY2122S2-CS2103T-W15-3/revert-151-change…
Browse files Browse the repository at this point in the history
…-storage-file-name

Revert "Refactor addressbook json files to TACH"
  • Loading branch information
LowJiaHao99 authored Apr 11, 2022
2 parents a1987ba + cea3766 commit 27458af
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/commons/core/LogsCenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class LogsCenter {
private static final int MAX_FILE_COUNT = 5;
private static final int MAX_FILE_SIZE_IN_BYTES = (int) (Math.pow(2, 20) * 5); // 5MB
private static final String LOG_FILE = "TACH.log";
private static final String LOG_FILE = "addressbook.log";
private static Level currentLogLevel = Level.INFO;
private static final Logger logger = LogsCenter.getLogger(LogsCenter.class);
private static FileHandler fileHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"z" : 99
}
},
"addressBookFilePath" : "TACH.json"
"addressBookFilePath" : "addressbook.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"y" : 100
}
},
"addressBookFilePath" : "TACH.json"
"addressBookFilePath" : "addressbook.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ public void read_missingFile_emptyResult() throws Exception {

@Test
public void read_notJsonFormat_exceptionThrown() {
assertThrows(DataConversionException.class, () -> readAddressBook("notJsonFormatTACH.json"));
assertThrows(DataConversionException.class, () -> readAddressBook("notJsonFormatAddressBook.json"));
}

@Test
public void readAddressBook_invalidStudentAddressBook_throwDataConversionException() {
assertThrows(DataConversionException.class, () -> readAddressBook("invalidStudentTACH.json"));
assertThrows(DataConversionException.class, () -> readAddressBook("invalidStudentAddressBook.json"));
}

@Test
public void readAddressBook_invalidAndValidStudentAddressBook_throwDataConversionException() {
assertThrows(DataConversionException.class, () -> readAddressBook("invalidAndValidStudentTACH.json"));
assertThrows(DataConversionException.class, () -> readAddressBook("invalidAndValidStudentAddressBook.json"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
public class JsonSerializableAddressBookTest {

private static final Path TEST_DATA_FOLDER = Paths.get("src", "test", "data", "JsonSerializableAddressBookTest");
private static final Path TYPICAL_STUDENTS_FILE = TEST_DATA_FOLDER.resolve("typicalStudentsTACH.json");
private static final Path INVALID_STUDENT_FILE = TEST_DATA_FOLDER.resolve("invalidStudentTACH.json");
private static final Path DUPLICATE_STUDENT_FILE = TEST_DATA_FOLDER.resolve("duplicateStudentTACH.json");
private static final Path TYPICAL_STUDENTS_FILE = TEST_DATA_FOLDER.resolve("typicalStudentsAddressBook.json");
private static final Path INVALID_STUDENT_FILE = TEST_DATA_FOLDER.resolve("invalidStudentAddressBook.json");
private static final Path DUPLICATE_STUDENT_FILE = TEST_DATA_FOLDER.resolve("duplicateStudentAddressBook.json");

@Test
public void toModelType_typicalStudentsFile_success() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConv
private UserPrefs getTypicalUserPrefs() {
UserPrefs userPrefs = new UserPrefs();
userPrefs.setGuiSettings(new GuiSettings(1000, 500, 300, 100));
userPrefs.setAddressBookFilePath(Paths.get("TACH.json"));
userPrefs.setAddressBookFilePath(Paths.get("addressbook.json"));
return userPrefs;
}

Expand Down

0 comments on commit 27458af

Please sign in to comment.