com.estafet.microservices.scrum.lib.data.project.ProjectDataSetBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microservices-scrum-data-lib Show documentation
Show all versions of microservices-scrum-data-lib Show documentation
Libaries for Microservices data population for testing
package com.estafet.microservices.scrum.lib.data.project;
import java.util.ArrayList;
import java.util.List;
public class ProjectDataSetBuilder {
private List> data;
public ProjectDataSetBuilder setData(List> data) {
this.data = data;
return this;
}
public List build() {
List projects = new ArrayList();
for (int i = 1; i < data.size(); i++) {
List row = data.get(i);
Project project = new ProjectBuilder()
.setTitle(row.get(0))
.setNoSprints(Integer.parseInt(row.get(1)))
.setSprintLengthDays(Integer.parseInt(row.get(2)))
.build();
projects.add(project);
}
return projects;
}
}