org.eclipse.ease.modules.unittest.modules

## Class DefaultAssertion

- java.lang.Object
- - org.eclipse.ease.modules.unittest.modules.DefaultAssertion

All Implemented Interfaces:
  IAssertion

    public class DefaultAssertion
    extends Object
    implements IAssertion

A default implementation for `IAssertion` that adds support for error messages.

### Field Summary

### Fields inherited from interface org.eclipse.ease.modules.unittest.modules.IAssertion

`INVALID, VALID`

### Constructor Summary

Constructors
Constructor and Description
`DefaultAssertion(boolean valid, String errorDescription)`
`DefaultAssertion(List<IScriptDebugFrame> stackTrace, boolean valid, String errorDescription)`
`DefaultAssertion(String errorDescription)` Default constructor for invalid assertions.

### Method Summary

All Methods Instance Methods Concrete Methods
`List<IScriptDebugFrame>` `getStackTrace()`
`boolean` `isValid()` Return `true` when assertion is valid.
`String` `toString()`

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

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### DefaultAssertion

    public DefaultAssertion(List<IScriptDebugFrame> stackTrace,
                            boolean valid,
                            String errorDescription)

#### DefaultAssertion

    public DefaultAssertion(boolean valid,
                            String errorDescription)

#### DefaultAssertion

    public DefaultAssertion(String errorDescription)

Default constructor for invalid assertions.

Parameters:
  `errorDescription` - cause of error

### Method Detail

#### isValid

    public boolean isValid()

Description copied from interface: `IAssertion`
Return `true` when assertion is valid.

Specified by:
  `isValid` in interface `IAssertion`
Returns:
  `true` on valid assertion

#### getStackTrace

    public List<IScriptDebugFrame> getStackTrace()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`