<s> """<STR_LIT>""" <EOL> import unittest <EOL> import click <EOL> from click . testing import CliRunner <EOL> from plan . commands import Echo <EOL> from plan . testsuite import BaseTestCase <EOL> class EchoTestRunner ( object ) : <EOL> def __init__ ( self ) : <EOL> self . runner = CliRunner ( ) <EOL> def invoke ( self , echo_method , message ) : <EOL> @ click . command ( ) <EOL> @ click . argument ( '<STR_LIT:message>' ) <EOL> def command ( message ) : <EOL> echo_method ( message ) <EOL> return self . runner . invoke ( command , [ message ] ) <EOL> class EchoTestCase ( BaseTestCase ) : <EOL> def setup ( self ) : <EOL> self . runner = EchoTestRunner ( ) <EOL> def teardown ( self ) : <EOL> self . runner = None <EOL> def test_echo ( self ) : <EOL> result = self . runner . invoke ( Echo . echo , '<STR_LIT>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def test_secho ( self ) : <EOL> result = self . runner . invoke ( Echo . secho , '<STR_LIT>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def test_message ( self ) : <EOL> result = self . runner . invoke ( Echo . message , '<STR_LIT:message>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def test_write ( self ) : <EOL> result = self . runner . invoke ( Echo . write , '<STR_LIT>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def test_fail ( self ) : <EOL> result = self . runner . invoke ( Echo . fail , '<STR_LIT>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def test_add ( self ) : <EOL> result = self . runner . invoke ( Echo . add , '<STR_LIT>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def test_done_with_message ( self ) : <EOL> result = self . runner . invoke ( Echo . done , '<STR_LIT>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def test_done_without_message ( self ) : <EOL> result = self . runner . invoke ( Echo . done , '<STR_LIT>' ) <EOL> self . assert_true ( result . exit_code == <NUM_LIT:0> ) <EOL> self . assert_equal ( result . output , '<STR_LIT>' ) <EOL> def suite ( ) : <EOL> suite = unittest . TestSuite ( ) <EOL> suite . addTest ( unittest . makeSuite ( EchoTestCase ) ) <EOL> return suite </s>
