use of com.github.vase4kin.teamcityapp.tests.api.TestOccurrences in project TeamCityApp by vase4kin.
the class Mocks method createBuildMock.
/**
* MOCK
*
* @return parametrized build
*/
public static Build createBuildMock(String href, String number, String buildTypeId, String status, String state, String statusText, String waitReason, String branchName, String startDate, String startEstimate, String queuedDate, String finishDate) {
Build build = new Build(href, number, buildTypeId, status, state, statusText, waitReason, branchName, startDate, startEstimate, queuedDate, finishDate, "http://www.google.com");
build.setChanges(new Changes("/guestAuth/app/rest/changes?locator=build:(id:826073)"));
build.setArtifacts(new Artifacts("/guestAuth/app/rest/builds/id:92912/artifacts/children/"));
build.setAgent(new Agent("agent-love"));
build.setTriggered(new Triggered("user", "details", new User("code-lover", null)));
List<Properties.Property> propertyList = new ArrayList<>();
propertyList.add(new Properties.Property("sdk", "24"));
propertyList.add(new Properties.Property("userName", "Murdock"));
build.setProperties(new Properties(propertyList));
build.setTestOccurrences(new TestOccurrences(10, 2, 4, "/guestAuth/app/rest/testOccurrences?locator=build:(id:835695)"));
return build;
}
Aggregations