package tars.commons.util;

import static org.junit.Assert.*;

import java.io.File;
import java.io.IOException;

import org.junit.Test;

import tars.testutil.SerializableTestClass;
import tars.testutil.TestUtil;

/**
 * Tests JSON Read and Write
 */
public class JsonUtilTest {
    
    private static final File SERIALIZATION_FILE = new File(TestUtil.getFilePathInSandboxFolder("serialize.json"));

//    @Test
//    public void serializeObjectToJsonFile_noExceptionThrown() throws IOException {
//        SerializableTestClass serializableTestClass = new SerializableTestClass();
//        serializableTestClass.setTestValues();
//
//        JsonUtil.serializeObjectToJsonFile(SERIALIZATION_FILE, serializableTestClass);
//
//        assertEquals(FileUtil.readFromFile(SERIALIZATION_FILE), SerializableTestClass.JSON_STRING_REPRESENTATION);
//    }
//
//    @Test
//    public void deserializeObjectFromJsonFile_noExceptionThrown() throws IOException {
//        FileUtil.writeToFile(SERIALIZATION_FILE, SerializableTestClass.JSON_STRING_REPRESENTATION);
//
//        SerializableTestClass serializableTestClass = JsonUtil
//                .deserializeObjectFromJsonFile(SERIALIZATION_FILE, SerializableTestClass.class);
//
//        assertEquals(serializableTestClass.getName(), SerializableTestClass.getNameTestValue());
//        assertEquals(serializableTestClass.getListOfLocalDateTimes(), SerializableTestClass.getListTestValues());
//        assertEquals(serializableTestClass.getMapOfIntegerToString(), SerializableTestClass.getHashMapTestValues());
//    }

    //TODO: @Test jsonUtil_readJsonStringToObjectInstance_correctObject()

    //TODO: @Test jsonUtil_writeThenReadObjectToJson_correctObject()

}

@@ -25,1548 +25,72 @@
 l;%0A%0A
-import static org.junit.Assert.*;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport org.junit.Test;%0A%0Aimport tars.testutil.SerializableTestClass;%0Aimport tars.testutil.TestUtil;%0A%0A/**%0A * Tests JSON Read and Write%0A */%0Apublic class JsonUtilTest %7B%0A    %0A    private static final File SERIALIZATION_FILE = new File(TestUtil.getFilePathInSandboxFolder(%22serialize.json%22));%0A%0A//    @Test%0A//    public void serializeObjectToJsonFile_noExceptionThrown() throws IOException %7B%0A//        SerializableTestClass serializableTestClass = new SerializableTestClass();%0A//        serializableTestClass.setTestValues();%0A//%0A//        JsonUtil.serializeObjectToJsonFile(SERIALIZATION_FILE, serializableTestClass);%0A//%0A//        assertEquals(FileUtil.readFromFile(SERIALIZATION_FILE), SerializableTestClass.JSON_STRING_REPRESENTATION);%0A//    %7D%0A//%0A//    @Test%0A//    public void deserializeObjectFromJsonFile_noExceptionThrown() throws IOException %7B%0A//        FileUtil.writeToFile(SERIALIZATION_FILE, SerializableTestClass.JSON_STRING_REPRESENTATION);%0A//%0A//        SerializableTestClass serializableTestClass = JsonUtil%0A//                .deserializeObjectFromJsonFile(SERIALIZATION_FILE, SerializableTestClass.class);%0A//%0A//        assertEquals(serializableTestClass.getName(), SerializableTestClass.getNameTestValue());%0A//        assertEquals(serializableTestClass.getListOfLocalDateTimes(), SerializableTestClass.getListTestValues());%0A//        assertEquals(serializableTestClass.getMapOfIntegerToString(), SerializableTestClass.getHashMapTestValues());%0A//    %7D
+/**%0A * Tests JSON Read and Write%0A */%0Apublic class JsonUtilTest %7B
 %0A%0A  

Remove unused code