コード例 #1
0
  @Override
  public void setUp() throws Exception {
    super.setUp();
    // Insert User
    idUserTest = this.createAndInsertUser(usernameTest, organizationTest, GPRole.USER);
    userTest =
        gpWSClient.getUserDetailByUsername(
            new SearchRequest(usernameTest, LikePatternType.CONTENT_EQUALS));
    // Insert Project
    idProjectTest =
        this.createAndInsertProject(
            "project_test_ws", false, 2, new Date(System.currentTimeMillis()));
    projectTest = gpWSClient.getProjectDetail(idProjectTest);
    // Insert the Account as the owner of Project
    this.createAndInsertAccountProject(userTest, projectTest, BasePermission.ADMINISTRATION);

    // Create root folders for the user
    idRootFolderA = this.createAndInsertFolder(nameRootFolderA, projectTest, 2, null);
    rootFolderA = gpWSClient.getFolderDetail(idRootFolderA);

    idRootFolderB = this.createAndInsertFolder(nameRootFolderB, projectTest, 1, null);
    rootFolderB = gpWSClient.getFolderDetail(idRootFolderB);

    // Set the list of keywords (for raster layer)
    layerInfoKeywords = new ArrayList<String>();
    layerInfoKeywords.add("keyword_test");
  }
コード例 #2
0
  @Override
  public void tearDown() {
    try {
      Assert.assertEquals(Boolean.TRUE, gpWSClient.deleteProject(idProjectTest));
    } catch (Exception ex) {
      logger.error("ERROR @@@@@@@@@@@@@@@@@@@@@@@@ " + ex);
    }

    super.tearDown();
  }