From 52013752ea98a0812c4f4b56aad86541c9229113 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 10 Aug 2021 09:50:28 +0200 Subject: [PATCH 1/2] fixed tests code cleanup --- .../sebserver/gbl/model/exam/Chapters.java | 25 +++++++++++++++++++ .../sebserver/gbl/model/exam/Indicator.java | 2 +- .../ZoomWindowScriptResolverTest.java | 5 ++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Chapters.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Chapters.java index 5b3eb085..923e3919 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Chapters.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Chapters.java @@ -85,6 +85,31 @@ public final class Chapters { return builder.toString(); } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((this.id == null) ? 0 : this.id.hashCode()); + return result; + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final Chapter other = (Chapter) obj; + if (this.id == null) { + if (other.id != null) + return false; + } else if (!this.id.equals(other.id)) + return false; + return true; + } + @Override public int compareTo(final Chapter o) { if (o == null) { diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Indicator.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Indicator.java index be21cd87..6446140a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Indicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Indicator.java @@ -270,7 +270,7 @@ public final class Indicator implements Entity { @Override public int compareTo(final Threshold o) { - return Double.compare(this.value, (o != null) ? o.value : 0); + return Double.compare(this.value, (o != null) ? o.value : -1); } } diff --git a/src/test/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ZoomWindowScriptResolverTest.java b/src/test/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ZoomWindowScriptResolverTest.java index a2a20887..6ef964a0 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ZoomWindowScriptResolverTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gui/service/session/proctoring/ZoomWindowScriptResolverTest.java @@ -156,6 +156,11 @@ public class ZoomWindowScriptResolverTest { + " passWord: config.passWord,\r\n" + " success(res) {\r\n" + " console.log('JOIN SUCCESS')\r\n" + + " ZoomMtg.getAttendeeslist({\r\n" + + " success: function (res) {\r\n" + + " console.log(res, \"get getAttendeeslist\");\r\n" + + " }\r\n" + + " });\r\n" + " },\r\n" + " error(res) {\r\n" + " console.warn('JOIN ERROR')\r\n" From c2ab294ac0eb6901ad9d1bc9e00124da109b5ee1 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 10 Aug 2021 15:16:36 +0200 Subject: [PATCH 2/2] minor config change --- src/main/resources/config/application-gui.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-gui.properties b/src/main/resources/config/application-gui.properties index fdb9eaf6..e19c5878 100644 --- a/src/main/resources/config/application-gui.properties +++ b/src/main/resources/config/application-gui.properties @@ -17,7 +17,7 @@ sebserver.gui.http.external.scheme=${sebserver.webservice.http.external.scheme} sebserver.gui.http.external.servername=${sebserver.webservice.http.external.servername} sebserver.gui.http.external.port=${sebserver.webservice.http.external.port} -sebserver.gui.http.webservice.scheme=https +sebserver.gui.http.webservice.scheme=http sebserver.gui.http.webservice.servername=localhost sebserver.gui.http.webservice.port=8080 sebserver.gui.http.webservice.contextPath=${server.servlet.context-path}