Commit c78ebd70 authored by vehjelmtvedt's avatar vehjelmtvedt
Browse files

Fix bug in UserStorage

parent 1188ff02
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="production" uuid="a2fcbe37-87b6-4a1f-a8c0-4102cd0f3616">
<driver-ref>sqlite.xerial</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/production.db</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
\ No newline at end of file
......@@ -29,7 +29,7 @@ public final class UserStorage
throws SQLException {
final Stored<User> stored = new Stored<User>(user);
PreparedStatement statement = connection.prepareStatement("INSERT INTO User VALUES(?,?,?,?");
PreparedStatement statement = connection.prepareStatement("INSERT INTO User VALUES(?,?,?,?)");
statement.setObject(1, stored.identity);
statement.setObject(2, stored.version);
statement.setString(3, user.name);
......
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="inf226.inchat.InchatTest" time="0.397" tests="1" errors="0" skipped="0" failures="0">
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="inf226.inchat.InchatTest" time="0.388" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="15"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
......@@ -12,7 +12,7 @@
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/surefire/surefirebooter16727841168076760306.jar /Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/surefire 2021-11-08T17-36-40_363-jvmRun1 surefire12686560047660004962tmp surefire_014934364296445214328tmp"/>
<property name="sun.java.command" value="/Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/surefire/surefirebooter13077719211697878457.jar /Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/surefire 2021-11-08T17-53-08_604-jvmRun1 surefire7599292887593056480tmp surefire_03110756745048275197tmp"/>
<property name="http.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/test-classes:/Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/classes:/Users/vetle/.m2/repository/org/eclipse/jetty/jetty-server/9.4.9.v20180320/jetty-server-9.4.9.v20180320.jar:/Users/vetle/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/Users/vetle/.m2/repository/org/eclipse/jetty/jetty-http/9.4.9.v20180320/jetty-http-9.4.9.v20180320.jar:/Users/vetle/.m2/repository/org/eclipse/jetty/jetty-util/9.4.9.v20180320/jetty-util-9.4.9.v20180320.jar:/Users/vetle/.m2/repository/org/eclipse/jetty/jetty-io/9.4.9.v20180320/jetty-io-9.4.9.v20180320.jar:/Users/vetle/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.4.2/junit-jupiter-api-5.4.2.jar:/Users/vetle/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar:/Users/vetle/.m2/repository/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar:/Users/vetle/.m2/repository/org/junit/platform/junit-platform-commons/1.4.2/junit-platform-commons-1.4.2.jar:/Users/vetle/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.4.2/junit-jupiter-engine-5.4.2.jar:/Users/vetle/.m2/repository/org/junit/platform/junit-platform-engine/1.4.2/junit-platform-engine-1.4.2.jar:/Users/vetle/.m2/repository/org/xerial/sqlite-jdbc/3.28.0/sqlite-jdbc-3.28.0.jar:/Users/vetle/.m2/repository/com/lambdaworks/scrypt/1.4.0/scrypt-1.4.0.jar:"/>
......@@ -28,7 +28,7 @@
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="surefire.real.class.path" value="/Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/surefire/surefirebooter16727841168076760306.jar"/>
<property name="surefire.real.class.path" value="/Users/vetle/Desktop/Skole/5. Semester/INF226/Oblig 3/inf226-2021-inchat/target/surefire/surefirebooter13077719211697878457.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
<property name="java.runtime.version" value="15.0.1+9-18"/>
......@@ -54,5 +54,5 @@
<property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
<property name="java.class.version" value="59.0"/>
</properties>
<testcase name="chatSetup" classname="inf226.inchat.InchatTest" time="0.391"/>
<testcase name="chatSetup" classname="inf226.inchat.InchatTest" time="0.382"/>
</testsuite>
\ No newline at end of file
-------------------------------------------------------------------------------
Test set: inf226.inchat.InchatTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.397 s - in inf226.inchat.InchatTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.388 s - in inf226.inchat.InchatTest
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment