Test::Stream::Compare::Object(3)

NAME
Test::Stream::Compare::Object - Representation of an object during deep comparison.

DEPRECATED
This distribution is deprecated in favor of Test2, Test2::Suite, and Test2::Workflow.

See Test::Stream::Manual::ToTest2 for a conversion guide.

DESCRIPTION
This class lets you specify an expected object in a deep comparison. You can check the fields/elements of the underlying reference, call methods to verify results, and do meta checks for object type and ref type.

METHODS

$class = $obj->meta_class
    The meta-class to be used when checking the object type. This is mainly listed because it is useful to override for specialized object subclasses.

    This normally just returns Test::Stream::Compare::Meta.

$class = $obj->object_base
    The base-class to be expected when checking the object type. This is mainly listed because it is useful to override for specialized object subclasses.

    This normally just returns 'UNIVERSAL'.

$obj->add_prop(...)
    Add a meta-propery to check, see Test::Stream::Compare::Meta. This method just delegates.

$obj->add_field(...)
    Add a hash-field to check, see Test::Stream::Compare::Hash. This method just delegates.

$obj->add_item(...)
    Add an array item to check, see Test::Stream::Compare::Array. This method just delegates.

$obj->add_call($method, $check)
$obj->add_call($method, $check, $name)
    Add a method call check. This will call the specified method on your object and verify the result. $method may be a method name, or a coderef. In the case of a coderef it can be helpful to provide an alternate name. When no name is provided the name is either $method or the string '\&CODE'.

SOURCE
The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT
Copyright 2015 Chad Granum <exodist7@gmail.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://dev.perl.org/licenses/