def test_execute(self, walk, gradle_output, exec_command): gradle_output.return_value = '/path/to/gapic' walk.return_value = (['/path', (), ('f1.java', 'f2.java', 'f3.py')],) task = format_tasks.JavaFormatTask() task.execute('/path/to/gapic', '/path/to/toolkit') exec_command.assert_called_once_with([ 'java', '-jar', '/path/to/gapic', '--replace', '/path/f1.java', '/path/f2.java', ])
def test_validate(self): task = format_tasks.JavaFormatTask() assert task.validate() == []