![JAR search and dependency download from the Maven repository](/logo.png)
com.pdsl.specifications.DefaultPhrase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pdsl Show documentation
Show all versions of pdsl Show documentation
The Polymorphic DSL test framework was designed to solve the challenges with testing large, complex systems. Modern architecture requires software to run as distrubited systems or on multiple platforms. The conventional cost of testing these systems is quite high.
PDSL allows a user to describe the system under test using a DSL of some kind: a picture,
sentences in natural languages, graphs, etc. Using a common DSL allows someone to make deeply scalable tests. A simple change to the DSL could generate dozens of tests providing coverage through many layers of the test pyramid or even multiple applications.
The newest version!
package com.pdsl.specifications;
import org.antlr.v4.runtime.tree.ParseTree;
/**
* A standard phrase to execute as part of a TestCase.
*/
public class DefaultPhrase implements Phrase {
private final ParseTree parseTree;
private final int indexId;
/**
* Creates a phrase to use in a test case.
*
* @param parseTree the ANTLR parse tree created from parsing a phrase
* @param indexId the sequential position of this phrase relative to the others
*/
public DefaultPhrase(ParseTree parseTree, int indexId) {
this.parseTree = parseTree;
this.indexId = indexId;
}
@Override
public ParseTree getParseTree() {
return parseTree;
}
@Override
public int getPrefilteredIndex() {
return indexId;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy