UserServiceTest.java
1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package fr.plil.sio.persistence.jdbc;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = JdbcApplication.class)
public class UserServiceTest {
@Test
public void testCreateAndFindByName() {
}
@Test(expected = IllegalArgumentException.class)
public void testCreateFailsWhenNameNull() {
}
@Test(expected = IllegalArgumentException.class)
public void testCreateFailsWhenGroupNameNull() {
}
@Test(expected = IllegalArgumentException.class)
public void testCreateFailsWhenGroupDoesNotExist() {
}
@Test(expected = IllegalStateException.class)
public void testCreateFailsWhenSameNameUserAlreadyPresent() {
}
public void testDeleteUser() {
}
public void testDeleteUserIfNotFound() {
}
@Test(expected = IllegalArgumentException.class)
public void testDeleteUserFailsIfNameNull() {
}
public void testFindUserByNameIfUserNotFound() {
}
@Test(expected = IllegalArgumentException.class)
public void testFindUserByNameFailsIfNameNull() {
}
public void testIsUserHasExactRight() {
}
public void testIsUserHasRightByParents() {
}
public void testIsUserHasNotTheExactRight() {
}
@Test(expected = IllegalArgumentException.class)
public void testIsUserHasRightFailsWhenUsernameNull() {
}
@Test(expected = IllegalArgumentException.class)
public void testIsUserHasRightFailsWhenRightNull() {
}
@Test(expected = IllegalArgumentException.class)
public void testIsUserHasRightFailsWhenRightNotInDatabase() {
}
}