func TestBookGetAllChapter(t *testing.T) { b := readhacker.Book{} chapters := b.GetAllChapter(1) if len(chapters) == 0 { t.Error("chapter not found") } else { for _, chapter := range chapters { fmt.Print(chapter.ChapterName + "\n") } } }