Package org.jfrog.build.api.builder.dependency

Examples of org.jfrog.build.api.builder.dependency.BuildDependencyBuilder


        String parentNumber = "5";
        String vcsRevision = "2421";
        List<Module> modules = Lists.newArrayList();
        List<PromotionStatus> statuses = Lists.newArrayList();
        List<BuildDependency> buildDependencies = Arrays.asList(
                new BuildDependencyBuilder().name("foo").number("123").startedDate(new Date()).build(),
                new BuildDependencyBuilder().name("bar").number("456").startedDate(new Date()).build()
        );
        Properties properties = new Properties();

        Build build = new Build();
        build.setVersion(version);
View Full Code Here


    /**
     * Validates the module values when using the defaults
     */
    public void testDefaultBuild() {
        BuildDependency buildDependency = new BuildDependencyBuilder().name("foo").number("123").started(timestamp).build();
        assertNull(buildDependency.getUrl(), "URI should have not been initialized.");
    }
View Full Code Here

    public void testBuilderSetters() {
        String name = "foo";
        String number = "123";
        String url = "http://myhostA.com/artifactory/builds/foo/123/";

        BuildDependency buildDependency = new BuildDependencyBuilder().name(name).number(number).started(timestamp).url(url).build();

        assertEquals(buildDependency.getName(), name, "Unexpected name.");
        assertEquals(buildDependency.getNumber(), number, "Unexpected number.");
        assertEquals(buildDependency.getStarted(), timestamp, "Unexpected started.");
        assertEquals(buildDependency.getUrl(), url, "Unexpected url.");
View Full Code Here

        assertEquals(buildDependency.getUrl(), url, "Unexpected url.");
    }

    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testNullDateForTimestamp() {
        new BuildDependencyBuilder().startedDate(null);
    }
View Full Code Here

    public void testNullDateForTimestamp() {
        new BuildDependencyBuilder().startedDate(null);
    }
    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testBuildWithNullForTimestamp() {
        new BuildDependencyBuilder().started(null).build();
    }
View Full Code Here

    public void testBuildWithNullForTimestamp() {
        new BuildDependencyBuilder().started(null).build();
    }
    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testBuildWithNullForName() {
        new BuildDependencyBuilder().name(null).build();
    }
View Full Code Here

    public void testBuildWithNullForName() {
        new BuildDependencyBuilder().name(null).build();
    }
    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testBuildWithNullForNumber() {
        new BuildDependencyBuilder().number(null).build();
    }
View Full Code Here

        String parentNumber = "5";
        String vcsRevision = "2421";
        List<Module> modules = Lists.newArrayList();
        List<PromotionStatus> statuses = Lists.newArrayList();
        List<BuildDependency> buildDependencies = Arrays.asList(
                new BuildDependencyBuilder().name("foo").number("123").startedDate(new Date()).build(),
                new BuildDependencyBuilder().name("bar").number("456").startedDate(new Date()).build()
        );
        Properties properties = new Properties();

        Build build = new Build();
        build.setVersion(version);
View Full Code Here

    public void testAddBuildDependencyMethod() {
        Build build = new Build();
        assertNull(build.getBuildDependencies(), "Default buildDependencies list should be null.");

        BuildDependency buildDependency = new BuildDependencyBuilder().name("foo").number("123").startedDate(new Date()).build();

        build.addBuildDependency(buildDependency);

        assertFalse(build.getBuildDependencies().isEmpty(), "BuildDependency object should have been added.");
        assertEquals(getOnlyElement(build.getBuildDependencies()), buildDependency, "Unexpected build dependency object.");

        BuildDependency otherBuildDependency = new BuildDependencyBuilder().name("bar").number("456").startedDate(new Date()).build();
        build.addBuildDependency(otherBuildDependency);

        assertEquals(build.getBuildDependencies().size(), 2, "Second BuildDependency object should have been added.");
        assertEquals(getLast(build.getBuildDependencies()), otherBuildDependency, "Unexpected build dependency object.");
    }
View Full Code Here

                                        buildDependencyPattern.getMatrixParams(), buildDependencyPattern.getPattern(),
                                        buildDependencyPattern.getPatternType()));
                    }

                    if (!patternArtifacts.isEmpty()) {
                        BuildDependency buildDependency = new BuildDependencyBuilder()
                                .name(artifacts.getBuildName())
                                .number(artifacts.getBuildNumber())
                                .url(artifacts.getUrl())
                                .started(artifacts.getStarted())
                                .build();
View Full Code Here

TOP

Related Classes of org.jfrog.build.api.builder.dependency.BuildDependencyBuilder

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.