Search in sources :

Example 6 with BbOrg

use of io.jenkins.blueocean.blueocean_bitbucket_pipeline.model.BbOrg in project blueocean-plugin by jenkinsci.

the class BitbucketApiTest method getUserTeamUsingEmail.

@Test
public void getUserTeamUsingEmail() throws JsonProcessingException {
    api = new BitbucketCloudApi(apiUrl, getMockedCredentials("x.y@gmail.com"));
    BbOrg team = api.getOrg("vivekp7");
    assertEquals("vivekp7", team.getKey());
    assertEquals("Vivek Pandey", team.getName());
    assertEquals("https://bitbucket.org/account/vivekp7/avatar/50/", team.getAvatar());
}
Also used : BbOrg(io.jenkins.blueocean.blueocean_bitbucket_pipeline.model.BbOrg) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Example 7 with BbOrg

use of io.jenkins.blueocean.blueocean_bitbucket_pipeline.model.BbOrg in project blueocean-plugin by jenkinsci.

the class BitbucketApiTest method getTeam.

@Test
public void getTeam() throws JsonProcessingException {
    BbOrg team = api.getOrg("vivektestteam");
    assertEquals("vivektestteam", team.getKey());
    assertEquals("Vivek's Team", team.getName());
    assertEquals("https://bitbucket.org/account/vivektestteam/avatar/50/", team.getAvatar());
}
Also used : BbOrg(io.jenkins.blueocean.blueocean_bitbucket_pipeline.model.BbOrg) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

BbOrg (io.jenkins.blueocean.blueocean_bitbucket_pipeline.model.BbOrg)7 Test (org.junit.Test)4 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)4 ArrayList (java.util.ArrayList)3 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 Nonnull (javax.annotation.Nonnull)2 StandardUsernamePasswordCredentials (com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials)1 Function (com.google.common.base.Function)1 User (hudson.model.User)1 BbCloudPage (io.jenkins.blueocean.blueocean_bitbucket_pipeline.cloud.model.BbCloudPage)1 BbCloudTeam (io.jenkins.blueocean.blueocean_bitbucket_pipeline.cloud.model.BbCloudTeam)1 BbUser (io.jenkins.blueocean.blueocean_bitbucket_pipeline.model.BbUser)1 BbServerPage (io.jenkins.blueocean.blueocean_bitbucket_pipeline.server.model.BbServerPage)1 BbServerUser (io.jenkins.blueocean.blueocean_bitbucket_pipeline.server.model.BbServerUser)1 ErrorMessage (io.jenkins.blueocean.commons.ErrorMessage)1 BlueOceanDomainRequirement (io.jenkins.blueocean.rest.impl.pipeline.credential.BlueOceanDomainRequirement)1 ScmOrganization (io.jenkins.blueocean.rest.impl.pipeline.scm.ScmOrganization)1 Container (io.jenkins.blueocean.rest.model.Container)1 Nullable (javax.annotation.Nullable)1