Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
JLoadTest.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.user.test.configurations;
2 
3 import com.griddynamics.jagger.user.test.configurations.auxiliary.Id;
4 import com.griddynamics.jagger.user.test.configurations.load.JLoadProfile;
5 import com.griddynamics.jagger.user.test.configurations.termination.JTerminationCriteria;
6 
23 public class JLoadTest {
24 
25  private final String id;
26  private final JLoadProfile load;
27  private final JTestDefinition testDescription;
28  private final JTerminationCriteria termination;
29 
30  private JLoadTest(Builder builder) {
31  this.id = builder.id.value();
32  this.testDescription = builder.jTestDefinition;
33  this.load = builder.load;
34  this.termination = builder.termination;
35  }
36 
46  public static Builder builder(Id id, JTestDefinition definition, JLoadProfile load, JTerminationCriteria termination) {
47  return new Builder(id, definition, load, termination);
48  }
49 
50  public static class Builder {
51  private final Id id;
52  private final JTestDefinition jTestDefinition;
53  private final JLoadProfile load;
54  private final JTerminationCriteria termination;
55 
56  private Builder(Id id, JTestDefinition jTestDefinition, JLoadProfile load, JTerminationCriteria termination) {
57  this.id = id;
58  this.jTestDefinition = jTestDefinition;
59  this.load = load;
60  this.termination = termination;
61  }
62 
68  public JLoadTest build() {
69  return new JLoadTest(this);
70  }
71  }
72 
73  public String getId() {
74  return id;
75  }
76 
78  return testDescription;
79  }
80 
81  public JLoadProfile getLoad() {
82  return load;
83  }
84 
86  return termination;
87  }
88 }