fixed tests code cleanup

This commit is contained in:
anhefti 2021-08-10 09:50:28 +02:00
parent 1eb7e957a9
commit 52013752ea
3 changed files with 31 additions and 1 deletions
src
main/java/ch/ethz/seb/sebserver/gbl/model/exam
test/java/ch/ethz/seb/sebserver/gui/service/session/proctoring

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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"