13
13
14
14
public class TestController extends BaseController <TestDto > {
15
15
private TestDao testDao ;
16
- private ProjectDao projectDao ;
17
16
private TestSuiteDao suiteDao ;
18
17
private TestResultDao resultDao ;
19
18
private Test2SuiteController test2SuiteController ;
@@ -24,7 +23,6 @@ public TestController(UserDto user) {
24
23
25
24
testDao = new TestDao ();
26
25
suiteDao = new TestSuiteDao ();
27
- projectDao = new ProjectDao ();
28
26
resultDao = new TestResultDao ();
29
27
test2SuiteController = new Test2SuiteController (user );
30
28
projectUserController = new ProjectUserController (user );
@@ -157,7 +155,6 @@ private List<TestDto> fillTests(List<TestDto> tests) throws AqualityException {
157
155
List <Test2SuiteDto > test2Suites = new ArrayList <>();
158
156
ProjectDto projectDto = new ProjectDto ();
159
157
projectDto .setId (tests .get (0 ).getProject_id ());
160
- projectDto = projectDao .getEntityById (projectDto );
161
158
162
159
for (TestSuiteDto testSuite : testSuites ) {
163
160
Test2SuiteDto test2Suite = new Test2SuiteDto ();
@@ -171,10 +168,6 @@ private List<TestDto> fillTests(List<TestDto> tests) throws AqualityException {
171
168
test .setDeveloper (projectUsers .stream ().filter (x -> x .getUser ().getId ().equals (test .getDeveloper_id ())).findFirst ().orElse (null ));
172
169
}
173
170
174
- if (projectDto .getStability_count () != null ) {
175
- test .setLastResultColors (testDao .getLastColors (test .getId (), projectDto .getStability_count ()));
176
- }
177
-
178
171
List <Test2SuiteDto > testSuiteLinks = test2Suites .stream ().filter (x -> x .getTest_id ().equals (test .getId ())).collect (Collectors .toList ());
179
172
test .setSuites (test2SuiteController .convertToSuites (testSuiteLinks , testSuites ));
180
173
filledTests .add (test );
0 commit comments