Package org.jfrog.build.api.dependency

Examples of org.jfrog.build.api.dependency.BuildDependency


        }
        if (started == null) {
            throw new IllegalArgumentException("BuildDependency must have a started time.");
        }

        BuildDependency buildDependency = new BuildDependency();
        buildDependency.setName(name);
        buildDependency.setNumber(number);
        buildDependency.setStarted(started);
        buildDependency.setUrl(url);
        return buildDependency;
    }
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

    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

public class BuildDependencyTest {
    /**
     * Validates the build dependency values after initializing the default constructor
     */
    public void testEmptyConstructor() {
        BuildDependency buildDependency = new BuildDependency();

        assertNull(buildDependency.getName(), "Name should have not been initialized.");
        assertNull(buildDependency.getNumber(), "Number should have not been initialized.");
        assertNull(buildDependency.getStarted(), "Timestamp should have not been initialized.");
        assertNull(buildDependency.getUrl(), "URI should have not been initialized.");
    }
View Full Code Here

        String number = "123";
        Date date = new Date();
        String started = new SimpleDateFormat(Build.STARTED_FORMAT).format(date);
        String url = "http://myhostA.com/artifactory/builds/foo/123/";

        BuildDependency buildDependency = new BuildDependency();
        buildDependency.setName(name);
        buildDependency.setNumber(number);
        buildDependency.setStarted(started);
        buildDependency.setUrl(url);

        assertEquals(buildDependency.getName(), name, "Unexpected name.");
        assertEquals(buildDependency.getNumber(), number, "Unexpected number.");
        assertEquals(buildDependency.getStarted(), started, "Unexpected started.");
        assertEquals(buildDependency.getUrl(), url, "Unexpected url.");
    }
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.dependency.BuildDependency

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.