Corrections travail en groupe

This commit is contained in:
2008-02-24 18:26:02 +00:00
parent 459770e802
commit 6bae365791

View File

@@ -44,12 +44,16 @@ public class UserManagerTest {
um = (IUserManager) context.lookup("UserManagerBean/remote");
am = (IArticleManager) context.lookup("ArticleManagerBean/remote");
cm = (IConferenceManager) context.lookup("ConferenceManagerBean/remote");
}
@Before
public void setup()throws PKAlreadyUsedException, UserEMailAlreadyExistsException, NoConferenceCreationTokenLeftException{
um.addUser("userManagerTestChairman", "", "First", "Last", "Yacos", "articleManagerTestChairman@yacos.com");
if (cm.exists(1)){
conf_id = 1;
}else{
cm.addConferenceCreationToken("userManagerTestChairman");
Conference conf = cm.addConference("titi","articleManagerTestChairman","desc conf","info en plus",new Date(),new Date(),new Date(),new Date(),new Date(),
Conference conf = cm.addConference("titi","userManagerTestChairman","desc conf","info en plus",new Date(),new Date(),new Date(),new Date(),new Date(),
0,
false,
false,
@@ -58,10 +62,6 @@ public class UserManagerTest {
"Other infos");
conf_id = conf.getId();
}
}
@Before
public void setup()throws PKAlreadyUsedException, UserEMailAlreadyExistsException{
if(!um.exists("truc")){
um.addUser("truc",User.hashPassword("pw"),"maxime","dagn","ipint", "e@ee.fr");
}
@@ -91,7 +91,7 @@ public class UserManagerTest {
assertFalse(list.isEmpty());
Speciality spe = list.get(list.size()-1);
assertEquals("xml", spe.getName());
//test que l'on ne peut pas ajouter 2 fois la meme specialit<EFBFBD>
// Test : we shouldn't be able to add twice the same speciality
int size = list.size();
um.addSpeciality("xml");
list = um.getSpecialities();
@@ -191,7 +191,12 @@ public class UserManagerTest {
if(um.exists("admin")){
um.removeUser("admin");
}
um.removeUser("userManagerTestChairman");
if(cm.exists(conf_id)){
cm.remove(conf_id);
}
if(um.exists("userManagerTestChairman")){
um.removeUser("userManagerTestChairman");
}
}