Package com.jcabi.github

Examples of com.jcabi.github.Contents.create()


     */
    @Test
    public void fetchesJsonRepresentation() throws Exception {
        final Contents contents = MkContentTest.repo().contents();
        final String path = "fake.txt";
        final Content content = contents.create(
            jsonContent(path, "for json", "json test")
        );
        MatcherAssert.assertThat(
            // @checkstyle MultipleStringLiterals (1 line)
            content.json().getString("name"),
View Full Code Here


     */
    @Test
    public void fetchesRawRepresentation() throws Exception {
        final Contents contents = MkContentTest.repo().contents();
        final String raw = "raw test \u20ac\u0000";
        final InputStream stream = contents.create(
            jsonContent("raw.txt", "for raw", raw)
        ).raw();
        try {
            MatcherAssert.assertThat(
                IOUtils.toString(stream, CharEncoding.UTF_8),
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.