1 package com.griddynamics.jagger.user.test.configurations;
3 import com.griddynamics.jagger.engine.e1.Provider;
4 import com.griddynamics.jagger.engine.e1.collector.test.TestListener;
5 import com.griddynamics.jagger.user.test.configurations.auxiliary.Id;
6 import com.griddynamics.jagger.user.test.configurations.limits.JLimit;
7 import com.griddynamics.jagger.user.test.configurations.load.JLoadProfile;
8 import com.griddynamics.jagger.user.test.configurations.termination.JTerminationCriteria;
10 import com.google.common.collect.Lists;
12 import java.util.Arrays;
13 import java.util.LinkedList;
14 import java.util.List;
15 import java.util.Objects;
36 private final String id;
40 private final List<JLimit> limits;
41 private final List<Provider<TestListener>> listeners;
44 this.
id = builder.id.
value();
45 this.testDescription = builder.jTestDefinition;
46 this.load = builder.load;
47 this.termination = builder.termination;
48 this.limits = builder.limits;
49 this.listeners = builder.listeners;
63 return new Builder(
id, definition, load, termination);
71 private List<JLimit> limits;
73 private List<Provider<TestListener>> listeners = Lists.newArrayList();
77 this.jTestDefinition = jTestDefinition;
79 this.termination = termination;
80 this.limits =
new LinkedList<>();
94 this.listeners.addAll(listeners);
109 this.listeners.add(listener);
119 Objects.requireNonNull(limits);
120 this.limits = Arrays.asList(limits);
130 Objects.requireNonNull(limits);
131 this.limits = limits;
150 return testDescription;