# perldoc > Test::Unit::Assertion

---
type: CommandReference
command: Test::Unit::Assertion
mode: perldoc
section: 
source: perldoc
---

## Quick Reference

- `Test::Unit::Assertion` — abstract base class for assertions plugged into `Test::Unit::Assert`
- `new()` — constructor; creates a new assertion object (optional but recommended)
- `do_assertion()` — core method; returns true on success, false on failure, or throws `Test::Unit::Failure`

## Name

Test::Unit::Assertion - The abstract base class for assertions

## Synopsis

perl
package MyAssertion;
use base 'Test::Unit::Assertion';

sub new { ... }
sub do_assertion {
    my ($self, @args) = @_;
    # return true or false, or die with Test::Unit::Failure
}
## See Also

- [Test::Unit::Assert](http://localhost/phpMan.php/perldoc/Test%3A%3AUnit%3A%3AAssert/markdown)
- [Test::Unit::CodeRef](http://localhost/phpMan.php/perldoc/Test%3A%3AUnit%3A%3ACodeRef/markdown)
- [Test::Unit::Regexp](http://localhost/phpMan.php/perldoc/Test%3A%3AUnit%3A%3ARegexp/markdown)