Package sagan.guides

Examples of sagan.guides.Tutorial


    @Before
    public void setup() {
        MockitoAnnotations.initMocks(this);
        controller = new TutorialController(guides);
        guide = new Tutorial(new DefaultGuideMetadata("my-org", "rest", "tut-rest", ""), guides, guides);
    }
View Full Code Here


    public void findAll() {
        given(org.findRepositoriesByPrefix(Tutorials.REPO_PREFIX)).willReturn(singletonList(repo));

        List<Tutorial> all = tutorials.findAll();
        assertThat(all.size(), is(1));
        Tutorial first = all.get(0);
        assertThat(first.getGuideId(), equalTo("rest"));
        assertThat(first.getTitle(), equalTo("Rest tutorial"));
        assertThat(first.getSubtitle(), equalTo("Learn some rest stuff"));
    }
View Full Code Here

    public void pageZero() throws IOException {
        given(org.getRepoInfo(eq("tut-rest"))).willReturn(repo);
        given(org.getReadme(eq("/repos/mock-org/tut-rest/readme"))).willReturn(readme);
        given(org.getAsciidocGuide("/repos/mock-org/tut-rest/zipball")).willReturn(tutorial);

        Tutorial tutorial = tutorials.find("rest");

        assertThat(tutorial.getContent(), equalTo("REST Tutorial"));
    }
View Full Code Here

TOP

Related Classes of sagan.guides.Tutorial

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.