Skip to content

Commit 78639a2

Browse files
committed
Fix javadoc for module "test" (#396)
1 parent 4087c1a commit 78639a2

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

metamorph-test/src/main/java/org/metafacture/metamorph/test/MetamorphTestSuite.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ public final class MetamorphTestSuite extends ParentRunner<Runner> {
4040

4141
private final List<Runner> runners;
4242

43+
/**
44+
* Constructs a MetamorphTestSuite by binding a list of Metamorph-Test resources
45+
* to a class.
46+
*
47+
* @param suiteRoot the {@code @TestClass}
48+
* @throws InitializationError
49+
*/
4350
public MetamorphTestSuite(final Class<?> suiteRoot)
4451
throws InitializationError {
4552
super(suiteRoot);

metamorph-test/src/main/java/org/metafacture/metamorph/test/reader/MultiFormatReader.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public MultiFormatReader(final String format) {
3535
setFormat(format);
3636
}
3737

38+
/**
39+
* Sets the format of {@value #currentReader} if the {@value #READER_FACTORY}
40+
* contains that format.
41+
*
42+
* @param format the format
43+
*/
3844
public void setFormat(final String format) {
3945
if (!READER_FACTORY.containsKey(format)) {
4046
throw new IllegalArgumentException("Format '" + format + "' not regognized");

metamorph-test/src/main/java/org/metafacture/metamorph/test/validators/StreamValidator.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ public final class StreamValidator implements StreamReceiver {
7070

7171
private final WellformednessChecker wellformednessChecker = new WellformednessChecker();
7272

73+
/**
74+
* Constructs a StreamValidator with a List of {@link Event}s. Validates this
75+
* stream of events using that list of expected stream events. If the stream is
76+
* invalid, the error handler set via {@link #setErrorHandler(Consumer)} is
77+
* called. Checks for wellformedness and resets the stream.
78+
*
79+
* @param expectedStream the List of expected stream events
80+
*/
7381
public StreamValidator(final List<Event> expectedStream) {
7482
this.eventStream = new EventNode(null, null);
7583
foldEventStream(this.eventStream, expectedStream.iterator());
@@ -100,6 +108,12 @@ public boolean isStrictRecordOrder() {
100108
return strictRecordOrder;
101109
}
102110

111+
/**
112+
* Sets strict record order.
113+
*
114+
* @param strictRecordOrder "true" if the record order shall be strict or
115+
* "false" otherwise
116+
*/
103117
public void setStrictRecordOrder(final boolean strictRecordOrder) {
104118
if (validating) {
105119
throw new IllegalStateException(CANNOT_CHANGE_OPTIONS);
@@ -112,6 +126,11 @@ public boolean isStrictKeyOrder() {
112126
return strictKeyOrder;
113127
}
114128

129+
/**
130+
* Sets strict key order.
131+
*
132+
* @param strictKeyOrder "true" if key order should be strict, otherwise "false"
133+
*/
115134
public void setStrictKeyOrder(final boolean strictKeyOrder) {
116135
if (validating) {
117136
throw new IllegalStateException(CANNOT_CHANGE_OPTIONS);
@@ -124,6 +143,12 @@ public boolean isStrictValueOrder() {
124143
return strictValueOrder;
125144
}
126145

146+
/**
147+
* Sets strict value order.
148+
*
149+
* @param strictValueOrder "true" if value order should be strict, otherwise
150+
* "false"
151+
*/
127152
public void setStrictValueOrder(final boolean strictValueOrder) {
128153
if (validating) {
129154
throw new IllegalStateException(CANNOT_CHANGE_OPTIONS);

0 commit comments

Comments
 (0)