use of objectFaker.propertyGenerator.FixedPropertyGenerator in project scheduling by ow2-proactive.
the class GetJobResultCommandTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
DataFaker<JobResultData> jobResultFaker = new DataFaker<JobResultData>(JobResultData.class);
jobResultFaker.setGenerator("id.readableName", new PrefixPropertyGenerator("job", 1));
jobResultFaker.setGenerator("allResults.key", new PrefixPropertyGenerator("task", 1));
jobResultFaker.setGenerator("allResults.value.id.readableName", new PrefixPropertyGenerator("task", 1));
jobResultFaker.setGenerator("allResults.value.serializedValue", new FixedPropertyGenerator(ObjectByteConverter.serializableToBase64String("Hello")));
jobResult = jobResultFaker.fake();
DataFaker<TaskResultData> taskResultsDataFaker = new DataFaker<TaskResultData>(TaskResultData.class);
taskResultsDataFaker.setGenerator("id.readableName", new PrefixPropertyGenerator("task", 4));
taskResultsDataFaker.setGenerator("serializedValue", new FixedPropertyGenerator(ObjectByteConverter.serializableToBase64String("Hello")));
taskResults = taskResultsDataFaker.fakeList(3);
}
use of objectFaker.propertyGenerator.FixedPropertyGenerator in project scheduling by ow2-proactive.
the class ListTaskStatesCommandTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
JobIdData jobId = jobIdFaker.fake();
taskStateFaker = new DataFaker<TaskStateData>(TaskStateData.class);
taskStateFaker.setGenerator("taskInfo.jobId", new FixedPropertyGenerator<JobIdData>(jobId));
taskStateFaker.setGenerator("taskInfo.taskId.readableName", new PrefixPropertyGenerator("task", 1));
taskStateFaker.setGenerator("name", new PrefixPropertyGenerator("task", 1));
taskStateFaker.setGenerator("tag", new FixedPropertyGenerator("LOOP-T2-1"));
this.taskData = this.taskStateFaker.fakeList(6);
this.taskDataFiltered = new ArrayList<>();
this.taskDataFiltered.add(this.taskData.get(0));
this.taskDataFiltered.add(this.taskData.get(1));
this.taskDataFiltered.add(this.taskData.get(2));
}
Aggregations