Package com.jcabi.github

Examples of com.jcabi.github.DeployKey


     * @throws Exception If some problem inside
     */
    @Test
    public void canFetchSingleDeployKey() throws Exception {
        final DeployKeys keys = MkDeployKeysTest.repo().keys();
        final DeployKey key = keys.create("Title", "Key");
        MatcherAssert.assertThat(keys.get(key.number()), Matchers.equalTo(key));
    }
View Full Code Here


     * @throws Exception If some problem inside.
     */
    @Test
    public void canCreateDeployKey() throws Exception {
        final DeployKeys keys = MkDeployKeysTest.repo().keys();
        final DeployKey key = keys.create("Title1", "Key1");
        MatcherAssert.assertThat(key, Matchers.equalTo(keys.get(key.number())));
    }
View Full Code Here

     * @throws Exception If some problem inside.
     */
    @Test
    public void canCreateDistinctDeployKeys() throws Exception {
        final DeployKeys keys = MkDeployKeysTest.repo().keys();
        final DeployKey first = keys.create("Title2", "Key2");
        final DeployKey second = keys.create("Title3", "Key3");
        MatcherAssert.assertThat(
            first,
            Matchers.not(Matchers.is(second))
        );
        MatcherAssert.assertThat(
            first.number(),
            Matchers.not(Matchers.is(second.number()))
        );
    }
View Full Code Here

     * @throws Exception If some problem inside.
     */
    @Test
    public void canRepresentAsJson() throws Exception {
        final DeployKeys keys = MkDeployKeysTest.repo().keys();
        final DeployKey first = keys.create("Title4", "Key4");
        MatcherAssert.assertThat(
            first.json().toString(),
            Matchers.allOf(
                Matchers.containsString("\"title\":\"Title4\""),
                Matchers.containsString("\"key\":\"Key4\"")
            )
        );
View Full Code Here

TOP

Related Classes of com.jcabi.github.DeployKey

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.