This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 5b0d8c19 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Merge remote-tracking branch 'origin/development' into...

Merge remote-tracking branch 'origin/development' into 111-easy-access-to-readme-md-and-potentially-other-files
parents 445ef09c 990efcd8
Branches
Tags
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -410,8 +410,6 @@ public class MetaDataRepository {
int ranking5 = 1;
if (maxScore>0.0f) ranking5 = (int) ((hitScore*5.0)/maxScore+0.5f);
parsedSearchHit.setRanking5(ranking5);
parsedSearchHit.setDownloads(0);
parsedSearchHit.setViews(0);
searchResults.add(parsedSearchHit);
}
......
......@@ -75,29 +75,10 @@ public class SearchResultDTO {
private int ranking5;
private List<PluginActionInfo> supportedActions = new ArrayList<>(2);
private Integer views;
private Integer downloads;
public SearchResultDTO() {
// default constructor
}
public Integer getDownloads() {
return downloads;
}
public void setDownloads(Integer downloads) {
this.downloads = downloads;
}
public Integer getViews() {
return views;
}
public void setViews(Integer views) {
this.views = views;
}
/**
* clone constructor
*
......
......@@ -64,6 +64,11 @@
[value]="exercise.programmingLanguages">
</jhi-exercise-metadata-item>
<jhi-exercise-metadata-item
[description]="'exercise.metadata.language'"
[value]="exercise.languages">
</jhi-exercise-metadata-item>
<jhi-exercise-metadata-item
[description]="'exercise.metadata.requires'"
[value]="exercise.requires">
......
......@@ -16,8 +16,8 @@ public class SearchResultDTOTest {
propertiesTester.testProperties(SearchResultDTO.class);
SearchResultDTO testSR = new SearchResultDTO();
SearchResultDTO testSRclone = new SearchResultDTO(testSR);
Assert.assertEquals("clone should be equas", testSR, testSRclone);
Assert.assertEquals("clone should be equal", testSR, testSRclone);
EqualsVerifier.forClass(SearchResultDTO.class).suppress(Warning.NONFINAL_FIELDS)
.withIgnoredFields("ranking5", "supportedActions", "views", "downloads").verify();
.withIgnoredFields("ranking5", "supportedActions").verify();
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment