-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.spoon; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.spoon.lib.information.ParserBookKbuDetail; | ||
import org.spoon.lib.information.ParserBookNaverDetail; | ||
import org.spoon.lib.model.BookInfo; | ||
|
||
public class SpoonInformationTest { | ||
@Test | ||
void getInformationByParser() { | ||
Spoon spoon = new Spoon(); | ||
BookInfo bookInfo = spoon.getInformation(new ParserBookKbuDetail(),"https://lib.bible.ac.kr/Search/Detail/165517"); | ||
inputBookInfo(bookInfo); | ||
} | ||
|
||
@Test | ||
void getInformationByNaver() { | ||
Spoon spoon = new Spoon(); | ||
BookInfo bookInfo = spoon.getInformation(new ParserBookNaverDetail("", ""), "https://lib.bible.ac.kr/Search/Detail/166123"); | ||
inputBookInfo(bookInfo); | ||
} | ||
|
||
private void inputBookInfo(BookInfo bookInfo) { | ||
System.out.println(" "); | ||
System.out.println("title : " + bookInfo.getTitle()); | ||
System.out.println("image : " + bookInfo.getImage()); | ||
System.out.println("isbn : " + bookInfo.getIsbn()); | ||
System.out.println("ddc : " + bookInfo.getDdc()); | ||
System.out.println("저자 : " + bookInfo.getAuthor()); | ||
System.out.println("책가격 : " + bookInfo.getDiscount().trim()); | ||
System.out.println("청구기호 : " + bookInfo.getNumber()); | ||
System.out.println("출판사 : " + bookInfo.getPublisher()); | ||
System.out.println("출판날자 : " + bookInfo.getPubdate()); | ||
System.out.println("설명 : " + bookInfo.getDescription()); | ||
System.out.println("-----------------------------------"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.spoon; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.spoon.notice.list.*; | ||
import org.spoon.notice.model.PostNoticeList; | ||
|
||
import java.util.List; | ||
|
||
class SpoonNoticeTest { | ||
|
||
@Test | ||
void getKbuNoticeList(){ | ||
Spoon spoon = new Spoon(); | ||
List<PostNoticeList> postNoticeLists =spoon.getKbuNoticeList(new ParserNoticeAiNaviList(1)); | ||
System.out.println(" "); | ||
System.out.println("bookRentBook"); | ||
for (PostNoticeList noticeList : postNoticeLists) { | ||
inputNoticeList(noticeList); | ||
} | ||
} | ||
|
||
private void inputNoticeList(PostNoticeList noticeList){ | ||
System.out.println("글 번호 : " + noticeList.getPageNum()); | ||
System.out.println("글 제목 : " + noticeList.getTitle()); | ||
System.out.println("글 작성자 : " + noticeList.getAuthor()); | ||
System.out.println("글 작성일 : " + noticeList.getDate()); | ||
System.out.println("글 url : " + noticeList.getUrl()); | ||
System.out.println("-----------------------------------"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.spoon; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.spoon.lib.model.BookSearchList; | ||
import org.spoon.lib.search.ParserBookSearchModel; | ||
|
||
import java.util.List; | ||
|
||
public class SpoonSearchTest { | ||
@Test | ||
void getBookSearchListBySearch() { | ||
Spoon spoon = new Spoon(); | ||
List<BookSearchList> bookSearchLists = spoon.getBookSearchList(new ParserBookSearchModel(), "언어", 1); | ||
for (BookSearchList bookList : bookSearchLists) { | ||
System.out.println("책 제목 : " + bookList.getTitle()); | ||
System.out.println("책 사진 : " + bookList.getImage()); | ||
System.out.println("책 etc : " + bookList.getEtc()); | ||
System.out.println("책 info : " + bookList.getInfo()); | ||
System.out.println("책 isbn : " + bookList.getIsbn()); | ||
System.out.println("-----------------------------------"); | ||
} | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.