Class TestSource

java.lang.Object
org.citrusframework.TestSource
Direct Known Subclasses:
TestClass

public class TestSource extends Object
Since:
4.0
  • Constructor Details

    • TestSource

      public TestSource(String type, String name)
    • TestSource

      public TestSource(String type, String name, String filePath)
    • TestSource

      public TestSource(Class<?> testClass)
  • Method Details

    • getType

      public String getType()
      The test source type. Usually one of java, xml, groovy, yaml.
    • getName

      public String getName()
      Gets the name.
    • getFilePath

      public String getFilePath()
    • getSourceFile

      public Resource getSourceFile()
      Gets the file resource for this test source.
    • getSourceFile

      public Resource getSourceFile(TestContext context)
      Gets the file resource for this test source and uses given test context to resolve the file path with test variables.
    • setSourceFile

      public void setSourceFile(Resource sourceFile)
    • sourceCode

      public TestSource sourceCode(String sourceCode)
      Add source code for this test source. Uses in memory resource to load the test source code.