Search in sources :

Example 1 with BlueTrend

use of io.jenkins.blueocean.rest.model.BlueTrend in project blueocean-plugin by jenkinsci.

the class BlueTrendTest method testTrendsIdCollision.

@Test
public void testTrendsIdCollision() throws Exception {
    // verify the extension did register correctly
    ExtensionList<BlueTrendFactory> extensionList = ExtensionList.lookup(BlueTrendFactory.class);
    Assert.assertEquals(2, extensionList.size());
    Project project = j.createProject(FreeStyleProject.class, "freestyle1");
    BlueOrganization org = new OrganizationImpl("jenkins", j.jenkins);
    BluePipeline pipeline = new AbstractPipelineImpl(org, project);
    BlueTrendContainer trends = pipeline.getTrends();
    BlueTrend trend = trends.get("junit");
    Assert.assertEquals("junit", trend.getId());
    Assert.assertEquals("JUnit", trend.getDisplayName());
}
Also used : BlueTrendFactory(io.jenkins.blueocean.rest.factory.BlueTrendFactory) BlueTrendContainer(io.jenkins.blueocean.rest.model.BlueTrendContainer) Project(hudson.model.Project) FreeStyleProject(hudson.model.FreeStyleProject) BlueOrganization(io.jenkins.blueocean.rest.model.BlueOrganization) BlueTrend(io.jenkins.blueocean.rest.model.BlueTrend) BluePipeline(io.jenkins.blueocean.rest.model.BluePipeline) Test(org.junit.Test) BaseTest(io.jenkins.blueocean.service.embedded.BaseTest)

Aggregations

FreeStyleProject (hudson.model.FreeStyleProject)1 Project (hudson.model.Project)1 BlueTrendFactory (io.jenkins.blueocean.rest.factory.BlueTrendFactory)1 BlueOrganization (io.jenkins.blueocean.rest.model.BlueOrganization)1 BluePipeline (io.jenkins.blueocean.rest.model.BluePipeline)1 BlueTrend (io.jenkins.blueocean.rest.model.BlueTrend)1 BlueTrendContainer (io.jenkins.blueocean.rest.model.BlueTrendContainer)1 BaseTest (io.jenkins.blueocean.service.embedded.BaseTest)1 Test (org.junit.Test)1