chippyash/SDO-Pattern

View on GitHub
docs/Test-Contract.md

Summary

Maintainability
Test Coverage
# Chippyash SDO Pattern

## 
      Chippyash\Test\SDO\AbstractSDO
    

*  Construction with parameters returns s d o
*  Construction parameters are optional
*  You can set a transport after construction
*  You can set a mapper after construction
*  You can set a validator after construction
*  Calling get data before fetch will return null
*  Calling get data after fetch will return data if available
*  Magic invoke method proxies to get data method
*  Fetch will throw exception if validator not set
*  Fetch will throw exception if mapper not set
*  Fetch will throw exception if transport not set
*  You can set the internal data manually
*  Send returns fluent interface on success
*  Send will throw exception if mapper not set
*  Send will throw exception if transport not set

## 
      Chippyash\Test\SDO\Exceptions\SDOException
    

*  Constructing an s d o exception creates correct class

## 
      Chippyash\Test\SDO\Mapper\Json
    

*  Map in accepts valid json
*  Map in throws exception with valid json
*  Map out returns json string for serializable object

## 
      Chippyash\Test\SDO\Mapper\Passthru
    

*  Map in returns what it is given
*  Map out returns what it is given

## 
      Chippyash\Test\SDO\Transport\File
    

*  Read will return file content if file exists
*  Read will throw exception if file does not exist
*  Write will write contents to file

## 
      Chippyash\Test\SDO\Validator\Passthru
    

*  Is valid always returns true


Generated by [chippyash/testdox-converter](https://github.com/chippyash/Testdox-Converter)