1 package com.griddynamics.jagger.user.test.configurations;
3 import com.google.common.collect.Lists;
4 import com.griddynamics.jagger.engine.e1.Provider;
5 import com.griddynamics.jagger.engine.e1.collector.test.TestListener;
6 import com.griddynamics.jagger.user.test.configurations.auxiliary.Id;
7 import com.griddynamics.jagger.user.test.configurations.limits.JLimit;
8 import com.griddynamics.jagger.user.test.configurations.load.JLoadProfile;
9 import com.griddynamics.jagger.user.test.configurations.termination.JTerminationCriteria;
11 import java.util.Arrays;
12 import java.util.LinkedList;
13 import java.util.List;
14 import java.util.Objects;
35 private final String id;
39 private final List<JLimit> limits;
40 private final List<Provider<TestListener>> listeners;
43 this.
id = builder.id.
value();
44 this.testDescription = builder.jTestDefinition;
45 this.load = builder.load;
46 this.termination = builder.termination;
47 this.limits = builder.limits;
48 this.listeners = builder.listeners;
62 return new Builder(
id, definition, load, termination);
70 private List<JLimit> limits;
72 private List<Provider<TestListener>> listeners = Lists.newArrayList();
76 this.jTestDefinition = jTestDefinition;
78 this.termination = termination;
79 this.limits =
new LinkedList<>();
93 this.listeners.addAll(listeners);
108 this.listeners.add(listener);
118 Objects.requireNonNull(limits);
119 this.limits = Arrays.asList(limits);
129 Objects.requireNonNull(limits);
130 this.limits = limits;
149 return testDescription;