From d3b70de58ccaaa800273076d6916d7fdbdeb6b3c Mon Sep 17 00:00:00 2001 From: leeyimin Date: Sun, 6 Nov 2016 21:40:57 +0800 Subject: [PATCH] Fix todo compare TaskMan equality --- src/test/java/seedu/taskman/commons/util/XmlUtilTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)); } }