@@ -0,0 +1,2479 @@
+/*%0A * Copyright (c) 2017 Farooq Khan%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to %0A * deal in the Software without restriction, including without limitation the%0A * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or%0A * sell copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in%0A * all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR %0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, %0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL %0A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER %0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0Apackage io.jsondb.tests;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport com.google.common.io.Files;%0A%0Aimport io.jsondb.DefaultSchemaVersionComparator;%0Aimport io.jsondb.JsonDBConfig;%0Aimport io.jsondb.Util;%0Aimport io.jsondb.io.JsonReader;%0A%0A/**%0A * Unit tests for JsonReader IO utility class%0A * @version 1.0 11-Dec-2017%0A */%0Apublic class JsonReaderTests %7B%0A  %0A  private String dbFilesLocation = %22src/test/resources/dbfiles/jsonReaderTests%22;%0A  private File dbFilesFolder = new File(dbFilesLocation);%0A  private File instancesJson = new File(dbFilesFolder, %22instances.json%22);%0A  %0A  /**%0A   * @throws java.lang.Exception%0A   */%0A  @Before%0A  public void setUp() throws Exception %7B%0A    dbFilesFolder.mkdir();%0A    Files.copy(new File(%22src/test/resources/dbfiles/instances.json%22), instancesJson);%0A  %7D%0A%0A  @After%0A  public void tearDown() throws Exception %7B%0A    Util.delete(dbFilesFolder);%0A  %7D%0A%0A  @Test%0A  public void testReadLine() throws IOException %7B%0A    JsonDBConfig dbConfig = new JsonDBConfig(dbFilesLocation, %22io.jsondb.tests.model%22, null, false,%0A        new DefaultSchemaVersionComparator());%0A    %0A    JsonReader jr = new JsonReader(dbConfig, instancesJson);%0A    %0A    assertNotNull(jr);%0A    assertEquals(%22%7B%5C%22schemaVersion%5C%22:%5C%221.0%5C%22%7D%22, jr.readLine());%0A  %7D%0A%7D%0A

Add unit tests for JsonReader class