Package sagan.guides

Examples of sagan.guides.GettingStartedGuide


    @Before
    public void setup() {
        MockitoAnnotations.initMocks(this);
        controller = new GettingStartedGuideController(guides);
        model = new ExtendedModelMap();
        guide = new GettingStartedGuide(
                new DefaultGuideMetadata("my-org", "rest-service", "gs-rest-service", ""), guides, guides);
    }
View Full Code Here


    public void loadGuideTitle() throws IOException {
        String description = "Awesome Guide :: Learn awesome stuff with this guide";
        REPO_INFO.setDescription(description);
        given(org.getReadme(anyString())).willReturn(readme);
        given(org.getRepoInfo(GUIDE_REPO_NAME)).willReturn(REPO_INFO);
        GettingStartedGuide guide = gsGuides.find(GUIDE_ID);
        assertThat(guide.getTitle(), equalTo("Awesome Guide"));
    }
View Full Code Here

    public void loadGuideSubtitle() throws IOException {
        String description = "Awesome Guide :: Learn awesome stuff with this guide";
        REPO_INFO.setDescription(description);
        given(org.getReadme(anyString())).willReturn(readme);
        given(org.getRepoInfo(GUIDE_REPO_NAME)).willReturn(REPO_INFO);
        GettingStartedGuide guide = gsGuides.find(GUIDE_ID);
        assertThat(guide.getSubtitle(), equalTo("Learn awesome stuff with this guide"));
    }
View Full Code Here

    @Test(expected = ResourceNotFoundException.class)
    public void unknownGuide() {
        String unknownGuideId = "foo";
        given(org.getRepoInfo(anyString())).willThrow(ResourceNotFoundException.class);
        given(org.getAsciidocGuide(anyString())).willThrow(ResourceNotFoundException.class);
        GettingStartedGuide unknownGuide = gsGuides.find(unknownGuideId);
        unknownGuide.getContent(); // should throw
    }
View Full Code Here

TOP

Related Classes of sagan.guides.GettingStartedGuide

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.