mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-10 08:21:21 +00:00
Merge pull request #1167 from shuheiktgw/add_meta
Add packages, actions and dependabot to meta
This commit is contained in:
@@ -23,6 +23,9 @@ public class GHMeta {
|
||||
private List<String> api;
|
||||
private List<String> pages;
|
||||
private List<String> importer = new ArrayList<>();
|
||||
private List<String> packages;
|
||||
private List<String> actions;
|
||||
private List<String> dependabot;
|
||||
|
||||
/**
|
||||
* Is verifiable password authentication boolean.
|
||||
@@ -86,4 +89,31 @@ public class GHMeta {
|
||||
public List<String> getImporter() {
|
||||
return Collections.unmodifiableList(importer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets package.
|
||||
*
|
||||
* @return the package
|
||||
*/
|
||||
public List<String> getPackages() {
|
||||
return Collections.unmodifiableList(packages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets actions.
|
||||
*
|
||||
* @return the actions
|
||||
*/
|
||||
public List<String> getActions() {
|
||||
return Collections.unmodifiableList(actions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets dependabot.
|
||||
*
|
||||
* @return the dependabot
|
||||
*/
|
||||
public List<String> getDependabot() {
|
||||
return Collections.unmodifiableList(dependabot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,11 +168,14 @@ public class GitHubTest extends AbstractGitHubWireMockTest {
|
||||
GHMeta meta = gitHub.getMeta();
|
||||
assertThat(meta.isVerifiablePasswordAuthentication(), is(true));
|
||||
assertThat(meta.getApi().size(), equalTo(19));
|
||||
assertThat(meta.getGit().size(), equalTo(19));
|
||||
assertThat(meta.getHooks().size(), equalTo(3));
|
||||
assertThat(meta.getImporter().size(), equalTo(6));
|
||||
assertThat(meta.getGit().size(), equalTo(36));
|
||||
assertThat(meta.getHooks().size(), equalTo(4));
|
||||
assertThat(meta.getImporter().size(), equalTo(3));
|
||||
assertThat(meta.getPages().size(), equalTo(6));
|
||||
assertThat(meta.getWeb().size(), equalTo(19));
|
||||
assertThat(meta.getWeb().size(), equalTo(20));
|
||||
assertThat(meta.getPackages().size(), equalTo(25));
|
||||
assertThat(meta.getActions().size(), equalTo(1739));
|
||||
assertThat(meta.getDependabot().size(), equalTo(3));
|
||||
|
||||
// Also test examples here
|
||||
Class[] examples = new Class[]{ ReadOnlyObjects.GHMetaPublic.class, ReadOnlyObjects.GHMetaPackage.class,
|
||||
@@ -185,11 +188,11 @@ public class GitHubTest extends AbstractGitHubWireMockTest {
|
||||
.fetch((Class<ReadOnlyObjects.GHMetaExample>) metaClass);
|
||||
assertThat(metaExample.isVerifiablePasswordAuthentication(), is(true));
|
||||
assertThat(metaExample.getApi().size(), equalTo(19));
|
||||
assertThat(metaExample.getGit().size(), equalTo(19));
|
||||
assertThat(metaExample.getHooks().size(), equalTo(3));
|
||||
assertThat(metaExample.getImporter().size(), equalTo(6));
|
||||
assertThat(metaExample.getGit().size(), equalTo(36));
|
||||
assertThat(metaExample.getHooks().size(), equalTo(4));
|
||||
assertThat(metaExample.getImporter().size(), equalTo(3));
|
||||
assertThat(metaExample.getPages().size(), equalTo(6));
|
||||
assertThat(metaExample.getWeb().size(), equalTo(19));
|
||||
assertThat(metaExample.getWeb().size(), equalTo(20));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user