Search in sources :

Example 1 with GithubGist

use of org.jetbrains.plugins.github.api.data.GithubGist in project intellij-community by JetBrains.

the class GithubCreateGistTestBase method checkGistDescription.

protected void checkGistDescription(@NotNull String expected) {
    GithubGist result = getGist();
    assertEquals("Gist content differs from sample", expected, result.getDescription());
}
Also used : GithubGist(org.jetbrains.plugins.github.api.data.GithubGist)

Example 2 with GithubGist

use of org.jetbrains.plugins.github.api.data.GithubGist in project intellij-community by JetBrains.

the class GithubCreateGistTestBase method checkGistPrivate.

protected void checkGistPrivate() {
    GithubGist result = getGist();
    assertFalse("Gist does not private", result.isPublic());
}
Also used : GithubGist(org.jetbrains.plugins.github.api.data.GithubGist)

Example 3 with GithubGist

use of org.jetbrains.plugins.github.api.data.GithubGist in project intellij-community by JetBrains.

the class GithubCreateGistTestBase method checkGistPublic.

protected void checkGistPublic() {
    GithubGist result = getGist();
    assertTrue("Gist does not public", result.isPublic());
}
Also used : GithubGist(org.jetbrains.plugins.github.api.data.GithubGist)

Example 4 with GithubGist

use of org.jetbrains.plugins.github.api.data.GithubGist in project intellij-community by JetBrains.

the class GithubCreateGistTestBase method checkGistAnonymous.

protected void checkGistAnonymous() {
    GithubGist result = getGist();
    assertTrue("Gist does not anonymous", result.getUser() == null);
}
Also used : GithubGist(org.jetbrains.plugins.github.api.data.GithubGist)

Example 5 with GithubGist

use of org.jetbrains.plugins.github.api.data.GithubGist in project intellij-community by JetBrains.

the class GithubCreateGistTestBase method checkGistContent.

protected void checkGistContent(@NotNull List<FileContent> expected) {
    GithubGist result = getGist();
    List<FileContent> files = new ArrayList<>();
    for (GithubGist.GistFile file : result.getFiles()) {
        files.add(new FileContent(file.getFilename(), file.getContent()));
    }
    assertTrue("Gist content differs from sample", Comparing.haveEqualElements(files, expected));
}
Also used : FileContent(org.jetbrains.plugins.github.api.requests.GithubGistRequest.FileContent) GithubGist(org.jetbrains.plugins.github.api.data.GithubGist) ArrayList(java.util.ArrayList)

Aggregations

GithubGist (org.jetbrains.plugins.github.api.data.GithubGist)6 ArrayList (java.util.ArrayList)1 FileContent (org.jetbrains.plugins.github.api.requests.GithubGistRequest.FileContent)1