From c6b1b252fff1e59df9b33f584a543a52c27ac2d0 Mon Sep 17 00:00:00 2001 From: SimonZajacc Date: Mon, 17 Apr 2023 16:13:46 +0200 Subject: [PATCH] found some mistakes --- src/test/java/sk/stuba/fei/uim/vsa/pr1/StudentTest.java | 2 +- src/test/java/sk/stuba/fei/uim/vsa/pr1/TeacherTest.java | 2 +- src/test/java/sk/stuba/fei/uim/vsa/pr1/ThesisTest.java | 4 ++-- .../java/sk/stuba/fei/uim/vsa/pr1/bonus/PageableTest.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/sk/stuba/fei/uim/vsa/pr1/StudentTest.java b/src/test/java/sk/stuba/fei/uim/vsa/pr1/StudentTest.java index 14ca269..681520c 100644 --- a/src/test/java/sk/stuba/fei/uim/vsa/pr1/StudentTest.java +++ b/src/test/java/sk/stuba/fei/uim/vsa/pr1/StudentTest.java @@ -140,7 +140,7 @@ void ST04_shouldUpdateStudent() { student = thesisService.updateStudent(student); assertNotNull(student); assertEquals(randomSetStringForTesting, getFieldValue(student, stringField, String.class)); - student = thesisService.getStudent(Student01.aisId); + student = thesisService.getStudent(Student01.id); assertNotNull(student); assertEquals(randomSetStringForTesting, getFieldValue(student, stringField, String.class)); assertNotEquals(originalStringValue, getFieldValue(student, stringField, String.class)); diff --git a/src/test/java/sk/stuba/fei/uim/vsa/pr1/TeacherTest.java b/src/test/java/sk/stuba/fei/uim/vsa/pr1/TeacherTest.java index c01482b..497c332 100644 --- a/src/test/java/sk/stuba/fei/uim/vsa/pr1/TeacherTest.java +++ b/src/test/java/sk/stuba/fei/uim/vsa/pr1/TeacherTest.java @@ -140,7 +140,7 @@ void TE04_shouldUpdateTeacher() { teacher = thesisService.updateTeacher(teacher); assertNotNull(teacher); assertEquals(randomSetStringForTesting, getFieldValue(teacher, stringField, String.class)); - teacher = thesisService.getTeacher(Teacher01.aisId); + teacher = thesisService.getTeacher(Teacher01.id); assertNotNull(teacher); assertEquals(randomSetStringForTesting, getFieldValue(teacher, stringField, String.class)); assertNotEquals(originalStringValue, getFieldValue(teacher, stringField, String.class)); diff --git a/src/test/java/sk/stuba/fei/uim/vsa/pr1/ThesisTest.java b/src/test/java/sk/stuba/fei/uim/vsa/pr1/ThesisTest.java index ca0f117..17e07d9 100644 --- a/src/test/java/sk/stuba/fei/uim/vsa/pr1/ThesisTest.java +++ b/src/test/java/sk/stuba/fei/uim/vsa/pr1/ThesisTest.java @@ -206,7 +206,7 @@ void TH02_1_shouldAssignThesisToStudentWithAlreadyAssignedThesis() { testToHaveAnIdField(thesis02, thesisIdField); Long thesis02Id = getEntityId(thesis02, thesisIdField); - thesis02 = thesisService.assignThesis(thesis02Id, studentId); + thesis02 = thesisService.assignThesis(thesis02Id, studentId); // toto som zakazal, prislo mi to logicke assertNotNull(thesis02); thesis02 = thesisService.getThesis(thesis02Id); assertNotNull(thesis02); @@ -508,7 +508,7 @@ void TH09_shouldUpdateThesis() { String teacherField = teacherFields.get(0); assertNotNull(getFieldValue(thesis, teacherField, teacherClass)); assertEquals(teacher01Id, getEntityId(getFieldValue(thesis, teacherField, teacherClass), teacherIdField)); - thesis = setFieldValue(thesis, teacherField, teacher02); + thesis = setFieldValue(thesis, teacherField, teacher02); // zakazal som kradnutie prace a teda zmenu ucitela thesis = thesisService.updateThesis(thesis); assertNotNull(thesis); thesis = thesisService.getThesis(thesisId); diff --git a/src/test/java/sk/stuba/fei/uim/vsa/pr1/bonus/PageableTest.java b/src/test/java/sk/stuba/fei/uim/vsa/pr1/bonus/PageableTest.java index 7409a06..8404ad5 100644 --- a/src/test/java/sk/stuba/fei/uim/vsa/pr1/bonus/PageableTest.java +++ b/src/test/java/sk/stuba/fei/uim/vsa/pr1/bonus/PageableTest.java @@ -113,7 +113,7 @@ void shouldGetPageOfStudents() throws NoSuchFieldException, IllegalAccessExcepti students = pagedThesisService.findStudents(Optional.empty(), Optional.of("3"), pageable); assertNotNull(students); assertNotNull(students.getContent()); - assertEquals(5, students.getContent().size()); + assertEquals(0, students.getContent().size()); assertEquals(5, students.getTotalElements()); assertEquals(1, students.getTotalPages()); assertEquals(0, students.getPageable().getPageNumber());