I have to test the class, but I am not a good tester in this case. so how would you guys test this class? in relation to what ? please show me some code. Below is the method to test :)
Query query = getSession()
.createSQLQuery(
"SELECT * FROM verwaltung_benutzer WHERE email = :benutzer_email AND id != :benutzer_id")
.setString("benutzer_email", benutzerEmail);
if (id == null) {
query.setLong("benutzer_id", 0);
} else {
query.setLong("benutzer_id", id);
}
return query.list().isEmpty();
} ´´´
Aucun commentaire:
Enregistrer un commentaire