Policy failures:
Code warning - failed on resource UserManagerTest.java. Reason: The local variable role is never read, line 11 Override reason: f
This commit is contained in:
@@ -3,6 +3,7 @@ package org.yacos.tests.core;
|
|||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -83,7 +84,7 @@ public class UserManagerTest {
|
|||||||
um.addSpeciality("xml");
|
um.addSpeciality("xml");
|
||||||
list = um.getSpecialities();
|
list = um.getSpecialities();
|
||||||
assertEquals(size, list.size());
|
assertEquals(size, list.size());
|
||||||
um.removeSpeciality(list.get(list.size()-1).getId());
|
um.removeSpeciality(spe.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -94,11 +95,17 @@ public class UserManagerTest {
|
|||||||
um.addSpecialityToUser(spe.getId(), "truc");
|
um.addSpecialityToUser(spe.getId(), "truc");
|
||||||
list = um.getSpecialitiesFromUser("truc");
|
list = um.getSpecialitiesFromUser("truc");
|
||||||
assertFalse(list.isEmpty());
|
assertFalse(list.isEmpty());
|
||||||
|
um.removeSpeciality(spe.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getSpecialitiesFromUser(){
|
public void removeSpecialitiesFromUser(){
|
||||||
|
um.addSpeciality("xml");
|
||||||
|
List<Speciality> list = um.getSpecialities();
|
||||||
|
Speciality spe = list.get(list.size()-1);
|
||||||
|
um.addSpecialityToUser(spe.getId(), "truc");
|
||||||
|
um.removeSpecialityFromUser(spe.getId(), "truc");
|
||||||
|
assertTrue(list.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user