Commit 77b66887bc8dd1d7b073ead8d2103306abe831c9

Authored by jcartign
1 parent 292aec6f

Forgot some @Test annotations

src/test/java/fr/plil/sio/persistence/jdbc/GroupServiceTest.java
... ... @@ -48,12 +48,14 @@ public class GroupServiceTest extends AbstractServiceSupport {
48 48 groupService.create("group");
49 49 }
50 50  
  51 + @Test
51 52 public void testDeleteGroup() {
52 53 assertTrue(groupService.delete("group"));
53 54 assertNull(groupService.findByName("group"));
54 55 assertFalse(groupService.delete("group"));
55 56 }
56 57  
  58 + @Test
57 59 public void testDeleteNotExistingGroup() {
58 60 assertFalse(groupService.delete("not-a-group"));
59 61 }
... ...
src/test/java/fr/plil/sio/persistence/jdbc/UserServiceTest.java
... ... @@ -63,10 +63,12 @@ public class UserServiceTest extends AbstractServiceSupport {
63 63 userService.create("user", "group");
64 64 }
65 65  
  66 + @Test
66 67 public void testDeleteUser() {
67 68 assertTrue(userService.delete("user"));
68 69 }
69 70  
  71 + @Test
70 72 public void testDeleteUserIfNotFound() {
71 73 assertFalse(userService.delete("user"));
72 74 }
... ... @@ -85,16 +87,19 @@ public class UserServiceTest extends AbstractServiceSupport {
85 87 assertNull(userService.findByName(null));
86 88 }
87 89  
  90 + @Test
88 91 public void testIsUserHasExactRight() {
89 92 Right right = rightService.findByName("parent").get(0);
90 93 assertTrue(userService.isUserHasRight("user", right));
91 94 }
92 95  
  96 + @Test
93 97 public void testIsUserHasRightByParents() {
94 98 Right right = rightService.findByName("sibling").get(0);
95 99 assertTrue(userService.isUserHasRight("user", right));
96 100 }
97 101  
  102 + @Test
98 103 public void testIsUserHasNotTheExactRight() {
99 104 Right right = rightService.findByName("not-for-me").get(0);
100 105 assertFalse(userService.isUserHasRight("user", right));
... ...