Pull-Request: Failing Test into tests #42

Merged
sebastian merged 14 commits from test-failing into tests 2023-11-11 11:19:32 +01:00
2 changed files with 22 additions and 23 deletions
Showing only changes of commit eaab4f8de2 - Show all commits

View File

@ -86,7 +86,22 @@
<recent name="$PROJECT_DIR$/src/test/java/core/taskgroups" />
</key>
</component>
<component name="RunManager" selected="JUnit.TaskServiceTest.deleteTask">
<component name="RunManager" selected="JUnit.TaskRepositoryTest">
<configuration name="TaskRepositoryTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="demo" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="core.tasks.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="core.tasks" />
<option name="MAIN_CLASS_NAME" value="core.tasks.TaskRepositoryTest" />
<option name="TEST_OBJECT" value="class" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="TaskServiceTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="demo" />
<extension name="coverage">
@ -134,22 +149,6 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="TaskServiceTest.editTask" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="demo" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="core.tasks.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="core.tasks" />
<option name="MAIN_CLASS_NAME" value="core.tasks.TaskServiceTest" />
<option name="METHOD_NAME" value="editTask" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="TaskgroupServiceTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="demo" />
<extension name="coverage">
@ -174,11 +173,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="JUnit.TaskServiceTest.deleteTask" />
<item itemvalue="JUnit.TaskServiceTest" />
<item itemvalue="JUnit.TaskServiceTest.createTask" />
<item itemvalue="JUnit.TaskServiceTest.editTask" />
<item itemvalue="JUnit.TaskRepositoryTest" />
<item itemvalue="JUnit.TaskgroupServiceTest" />
<item itemvalue="JUnit.TaskServiceTest" />
<item itemvalue="JUnit.TaskServiceTest.deleteTask" />
<item itemvalue="JUnit.TaskServiceTest.createTask" />
</list>
</recent_temporary>
</component>

View File

@ -49,7 +49,7 @@ public class TaskRepositoryTest {
List<Task> tasks_user1_false = taskRepository.findAllByUser(testUser1.getUsername(), false);
List<Task> tasks_user1_true = taskRepository.findAllByUser(testUser1.getUsername(), true);
assertEquals(7, tasks_user1_true.size());
assertEquals(7, tasks_user1_false.size());
assertEquals(8, tasks_user1_false.size());
assertTrue(tasks_user1_false.contains(testEntityManager.find(Task.class, 1L)));
assertTrue(tasks_user1_false.contains(testEntityManager.find(Task.class, 3L)));
@ -149,7 +149,7 @@ public class TaskRepositoryTest {
List<Task> active = taskRepository.findAllActive(testuser1.getUsername(), referenceDate);
//1,3,5,11,12
assertEquals(5, active.size());
assertEquals(6, active.size());
assertTrue(active.contains(testEntityManager.find(Task.class, 1L)));
assertTrue(active.contains(testEntityManager.find(Task.class, 3L)));
assertTrue(active.contains(testEntityManager.find(Task.class, 5L)));