diff options
| author | Szymon Szukalski <szymon@skas.io> | 2024-07-26 14:46:26 +1000 |
|---|---|---|
| committer | Szymon Szukalski <szymon@skas.io> | 2024-07-26 14:46:26 +1000 |
| commit | 39e7e3344bf0827fe9563dc1f08d18084316fd6f (patch) | |
| tree | 15d41d94a367dbc1806019f8bb72d3370c354a92 /src/test/java/com/stileeducation/markr/util/StudentBuilder.java | |
| parent | 491832c004d249e069843c7ec6672b1907f7e568 (diff) | |
Simplify entity model builders
Diffstat (limited to 'src/test/java/com/stileeducation/markr/util/StudentBuilder.java')
| -rw-r--r-- | src/test/java/com/stileeducation/markr/util/StudentBuilder.java | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/test/java/com/stileeducation/markr/util/StudentBuilder.java b/src/test/java/com/stileeducation/markr/util/StudentBuilder.java index 5189f19..897d84a 100644 --- a/src/test/java/com/stileeducation/markr/util/StudentBuilder.java +++ b/src/test/java/com/stileeducation/markr/util/StudentBuilder.java @@ -1,17 +1,13 @@ package com.stileeducation.markr.util; import com.stileeducation.markr.entity.Student; -import com.stileeducation.markr.entity.TestResult; - -import java.util.HashSet; -import java.util.Set; public class StudentBuilder { private Long id; private String firstName; private String lastName; private String studentNumber; - private Set<TestResult> testResults = new HashSet<>(); + public StudentBuilder withId(Long id) { this.id = id; @@ -33,18 +29,12 @@ public class StudentBuilder { return this; } - public StudentBuilder withTestResults(Set<TestResult> testResults) { - this.testResults = testResults; - return this; - } - public Student build() { Student student = new Student(); student.setId(id); student.setFirstName(firstName); student.setLastName(lastName); student.setStudentNumber(studentNumber); - student.setTestResults(testResults); return student; } }
\ No newline at end of file |
