Skip to content

Commit

Permalink
Merge branch 'develop' into KPMP-5569_add-clinical-data-to-ES-index
Browse files Browse the repository at this point in the history
  • Loading branch information
Dert1129 authored Nov 4, 2024
2 parents edd7bfa + f5f652d commit 412dad1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void addEnrollmentCategory(String enrollmentCategory) {
}

@JsonProperty("enrollment_category")
public Set<String> getenrollmentCategory() {
public Set<String> getEnrollmentCategory() {
if(enrollmentCategory.isEmpty()){
return null;
}else{
Expand All @@ -177,7 +177,7 @@ public Set<String> getenrollmentCategory() {

}

public void setenrollmentCategory(Set<String> enrollmentCategory) {
public void setEnrollmentCategory(Set<String> enrollmentCategory) {
this.enrollmentCategory = enrollmentCategory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,26 @@ public void setSampleType() {
}

@Test
public void testAddenrollmentCategory() {

public void testAddEnrollmentCategory() {
RepositoryDatasetDisplay repositoryDatasetDisplay = new RepositoryDatasetDisplay(repositoryFile);
repositoryDatasetDisplay.addEnrollmentCategory("enrollment_category");

assertEquals(1, repositoryDatasetDisplay.getenrollmentCategory().size());
assertEquals(true, repositoryDatasetDisplay.getenrollmentCategory().contains("enrollment_category"));
assertEquals(1, repositoryDatasetDisplay.getEnrollmentCategory().size());
}

@Test
public void setenrollmentCategory() {
Set<String> expected = new HashSet<String>(Arrays.asList("enrollment_category"));
repositoryDatasetDisplay.setenrollmentCategory(expected);
Set<String> actual = repositoryDatasetDisplay.getenrollmentCategory();
assertEquals(1, repositoryDatasetDisplay.getEnrollmentCategory().size());
assertEquals(true, repositoryDatasetDisplay.getEnrollmentCategory().contains("enrollment_category"));
}

@Test
public void setEnrollmentCategory() {
Set<String> expected = new HashSet<String>(Arrays.asList("enrollment_category"));
repositoryDatasetDisplay.setEnrollmentCategory(expected);
Set<String> actual = repositoryDatasetDisplay.getEnrollmentCategory();
assertEquals(expected, actual);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void setSampleType() {
}

@Test
public void setenrollmentCategory() {
public void setEnrollmentCategory() {
repositoryDataset.setEnrollmentCategory("ttype");
assertEquals("ttype", repositoryDataset.getEnrollmentCategory());
}
Expand Down

0 comments on commit 412dad1

Please sign in to comment.