diff --git a/src/test/java/seedu/taskman/commons/util/XmlUtilTest.java b/src/test/java/seedu/taskman/commons/util/XmlUtilTest.java index f7820ccbb264..26cae6aa52bc 100644 --- a/src/test/java/seedu/taskman/commons/util/XmlUtilTest.java +++ b/src/test/java/seedu/taskman/commons/util/XmlUtilTest.java @@ -80,14 +80,13 @@ public void saveDataToFile_validFile_dataSaved() throws Exception { XmlSerializableTaskMan dataToWrite = new XmlSerializableTaskMan(new TaskMan()); XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite); XmlSerializableTaskMan dataFromFile = XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableTaskMan.class); - assertEquals((new TaskMan(dataToWrite)).toString(), (new TaskMan(dataFromFile)).toString()); - //TODO: use equality instead of string comparisons + assertEquals(new TaskMan(dataToWrite), new TaskMan(dataFromFile)); TaskManBuilder builder = new TaskManBuilder(new TaskMan()); dataToWrite = new XmlSerializableTaskMan(builder.withTask(TestUtil.generateSampleTaskData().get(0)).withTag("Friends").build()); XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite); dataFromFile = XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableTaskMan.class); - assertEquals((new TaskMan(dataToWrite)).toString(), (new TaskMan(dataFromFile)).toString()); + assertEquals(new TaskMan(dataToWrite), new TaskMan(dataFromFile)); } }