Skip to content

Commit

Permalink
change method name
Browse files Browse the repository at this point in the history
  • Loading branch information
ZDenizYStenhaug committed Jan 11, 2022
1 parent cb26733 commit ed99e1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public String allTags(Model model) {
public String viewMoreInfoAboutTag(Model model,
@RequestParam("tagName") String name) throws IOException {
Tag tag = tagService.findByName(name);
String extract = tagService.getMoreInformationAboutTag(tag);
String extract = tagService.getMoreInfo(tag);
model.addAttribute("tag", tag);
model.addAttribute("extract", extract);
String username = memberService.getCurrentUserLogin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private String getJSONFromWikipedia(Tag tag) throws IOException {
return output.toString();
}

public String getMoreInformationAboutTag(Tag tag) throws IOException {
public String getMoreInfo(Tag tag) throws IOException {
String wikiOutput = getJSONFromWikipedia(tag);
JSONObject json = new JSONObject(wikiOutput);
JSONObject pages = json.getJSONObject("query").getJSONObject("pages");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void getInformationForTag() throws IOException {
// create new tag
Tag tag = createTag();
Assertions.assertNotNull(tagRepo.findByName(tag.getName()));
String actual = tagService.getMoreInformationAboutTag(tag);
String actual = tagService.getMoreInfo(tag);
String expected = "Juggling is a physical skill, performed by a juggler, involving the manipulation of objects for recreation, entertainment, art or sport. The most recognizable form of juggling is toss juggling. Juggling can be the manipulation of one object or many objects at the same time, most often using one or two hands but also possible with feet. Jugglers often refer to the objects they juggle as props. The most common props are balls, clubs, or rings. Some jugglers use more dramatic objects such as knives, fire torches or chainsaws. The term juggling can also commonly refer to other prop-based manipulation skills, such as diabolo, plate spinning, devil sticks, poi, cigar boxes, contact juggling, hooping, yo-yo, and hat manipulation.";
Assertions.assertEquals(expected, actual);
// delete tag
Expand Down

0 comments on commit ed99e1a

Please sign in to comment.