package com.nigorojr.typebest;

import java.sql.SQLException;
import java.util.LinkedHashMap;

public class Tester {

    public static void main(String[] args) {
        // This is to test the behavior of the Database class
        try {
            Records rec = new Records();
            System.out.println("exist?\n" + rec.isTableExist());
            LinkedHashMap<String, String> pair = new LinkedHashMap<String, String>();
            pair.put("foo", "int");
            pair.put("hoge", "varchar(50)");
            if (!rec.isTableExist()) {
                rec.createTable(pair);
            }
            System.out.println("finished creating...");
            LinkedHashMap<String, String> ins = new LinkedHashMap<String, String>();
            ins.put("foo", "50");
            ins.put("hoge", "'barbar'");
            rec.insert(ins);
        }
        catch (SQLException e) {
            e.printStackTrace();
        }
    }

}

@@ -842,16 +842,223 @@
 t(ins);%0A
+            %0A            // Test for Preferences class%0A            Preferences p = new Preferences(%22test_user%22);%0A            p.readPreferencesForID(1);%0A            System.out.println(p.getKeyboardLayout());%0A
         

Add test for Preferences class