Package org.antlr.gunit

## Class AbstractTest

- java.lang.Object
- - org.antlr.gunit.AbstractTest

All Implemented Interfaces:
  `ITestCase`

Direct Known Subclasses:
  `BooleanTest`, `OutputTest`, `ReturnTest`

    public abstract class AbstractTest
    extends java.lang.Object
    implements ITestCase

### Field Summary

Fields
`protected java.lang.String` `actual`
`protected boolean` `hasErrorMsg`
`protected java.lang.String` `header`

### Constructor Summary

Constructors
`AbstractTest​()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`java.lang.String` `getActual​()`
`java.lang.String` `getActualResult​()`
`abstract java.lang.String` `getExpected​()`
`java.lang.String` `getExpectedResult​()`
`java.lang.String` `getHeader​()`
`abstract java.lang.String` `getResult​(gUnitTestResult testResult)`
`int` `getTestCaseIndex​()` Get the index of the test case in the test group for a rule.
`java.lang.String` `getTestedRuleName​()` Get the name of the rule that is tested by this test case.
`abstract java.lang.String` `getText​()`
`abstract int` `getType​()`
`void` `setActual​(java.lang.String actual)`
`void` `setHeader​(java.lang.String rule, java.lang.String lexicalRule, java.lang.String treeRule, int numOfTest, int line, java.lang.String input)`
`void` `setTestCaseIndex​(int testCaseIndex)`
`void` `setTestedRuleName​(java.lang.String testedRuleName)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### header

    protected java.lang.String header

#### actual

    protected java.lang.String actual

#### hasErrorMsg

    protected boolean hasErrorMsg

### Constructor Detail

#### AbstractTest

    public AbstractTest​()

### Method Detail

#### getType

    public abstract int getType​()

#### getText

    public abstract java.lang.String getText​()

#### getExpected

    public abstract java.lang.String getExpected​()

#### getExpectedResult

    public java.lang.String getExpectedResult​()

#### getResult

    public abstract java.lang.String getResult​(gUnitTestResult testResult)

#### getHeader

    public java.lang.String getHeader​()

#### getActual

    public java.lang.String getActual​()

#### getActualResult

    public java.lang.String getActualResult​()

#### getTestedRuleName

    public java.lang.String getTestedRuleName​()

Description copied from interface: `ITestCase`
Get the name of the rule that is tested by this test case.

Specified by:
  `getTestedRuleName` in interface `ITestCase`
Returns:
  name of the tested rule.

#### getTestCaseIndex

    public int getTestCaseIndex​()

Description copied from interface: `ITestCase`
Get the index of the test case in the test group for a rule. Starting from 0.

Specified by:
  `getTestCaseIndex` in interface `ITestCase`
Returns:
  index number of the test case.

#### setHeader

    public void setHeader​(java.lang.String rule,
                          java.lang.String lexicalRule,
                          java.lang.String treeRule,
                          int numOfTest,
                          int line,
                          java.lang.String input)

#### setActual

    public void setActual​(java.lang.String actual)

#### setTestedRuleName

    public void setTestedRuleName​(java.lang.String testedRuleName)

#### setTestCaseIndex

    public void setTestCaseIndex​(int testCaseIndex)