From ed99e1ac333410b15cec1a11347a5b88261b9020 Mon Sep 17 00:00:00 2001 From: lovemrlemon Date: Tue, 11 Jan 2022 21:53:54 +0300 Subject: [PATCH] change method name --- .../yilmaz4/deniz/akitaBackend/controller/TagController.java | 2 +- .../edu/boun/yilmaz4/deniz/akitaBackend/service/TagService.java | 2 +- src/test/java/edu/boun/yilmaz4/deniz/akitaBackend/TagTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/controller/TagController.java b/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/controller/TagController.java index 7b72ea6..0c1eded 100644 --- a/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/controller/TagController.java +++ b/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/controller/TagController.java @@ -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(); diff --git a/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/service/TagService.java b/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/service/TagService.java index 13685ae..ca3cdc5 100644 --- a/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/service/TagService.java +++ b/src/main/java/edu/boun/yilmaz4/deniz/akitaBackend/service/TagService.java @@ -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"); diff --git a/src/test/java/edu/boun/yilmaz4/deniz/akitaBackend/TagTests.java b/src/test/java/edu/boun/yilmaz4/deniz/akitaBackend/TagTests.java index c3046c3..eb94106 100644 --- a/src/test/java/edu/boun/yilmaz4/deniz/akitaBackend/TagTests.java +++ b/src/test/java/edu/boun/yilmaz4/deniz/akitaBackend/TagTests.java @@ -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