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