예제 #1
0
 public void testUserBuilderAddNew() throws Exception {
   ModulesBuilder modulesBuilder = new ModulesBuilder.List().build();
   List<Module> moduleList = command.getResult(modulesBuilder).getModules().getModuleList();
   UserBuilder.AddNew addNewUserBuilder =
       new UserBuilder.AddNew(
               properties.getProperty("cms.test.user.name"),
               properties.getProperty("cms.test.user.language"),
               properties.getProperty("cms.test.user.lcid"))
           .Password(properties.getProperty("cms.test.user.password"))
           .EMail(properties.getProperty("cms.test.user.email"))
           .MaxLogin(2)
           .Project(
               properties.getProperty("cms.test.project.guid"),
               true,
               true,
               Project.UserLevel.ADMINISTRATOR);
   for (Module module : moduleList) {
     addNewUserBuilder.Module(module.getGuid());
     if (module.getModules() != null) {
       List<Module> cmsModuleList = module.getModules().getModuleList();
       for (Module cmsModule : cmsModuleList) {
         addNewUserBuilder.Module(cmsModule.getGuid());
       }
     }
   }
   UserBuilder userBuilder = addNewUserBuilder.build();
   command.getResult(userBuilder);
 }
예제 #2
0
 @Override
 protected void tearDown() throws Exception {
   super.tearDown();
   RqlBuilder logoutBuilder = new AdministrationBuilder.Logout(this.loginGuid).build();
   command.addCommand(logoutBuilder);
   command.execute();
 }
예제 #3
0
 public void testUserBuilderSaveGroup() throws Exception {
   UserBuilder userBuilder =
       new UserBuilder.SaveGroup(properties.getProperty("cms.test.user.guid"))
           .Group(properties.getProperty("cms.test.goup.guid"))
           .build();
   command.getResult(userBuilder);
 }
예제 #4
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   this.properties = new Properties();
   properties.load(ClassLoader.getSystemResourceAsStream("cms.properties"));
   CmsServer server = new CmsServer(properties.getProperty("cms.test.url"));
   RemoteCallWorker worker = new RemoteCallWorker(server);
   this.command = new RqlCommand(worker);
   AdministrationBuilder loginBuilder =
       new AdministrationBuilder.Login(
               properties.getProperty("cms.test.user"),
               properties.getProperty("cms.test.password"))
           .build();
   this.loginGuid = command.getResult(loginBuilder).getLogin().getGuid();
   AdministrationBuilder validateBuilder =
       new AdministrationBuilder.Validate(properties.getProperty("cms.test.project.guid")).build();
   command.getResult(validateBuilder);
 }
예제 #5
0
 public void testUserBuilderDelete() throws Exception {
   UserBuilder userBuilder =
       new UserBuilder.Delete(properties.getProperty("cms.test.user.delete.guid")).build();
   command.getResult(userBuilder);
 }
예제 #6
0
 public void testUserBuilderSessionInfo() throws Exception {
   UserBuilder userBuilder = new UserBuilder.SessionInfo().build();
   command.getResult(userBuilder);
 }