# Path: artman/utils/protoc_utils.py
# class _SimpleProtoParams(object):
# class _JavaProtoParams(_SimpleProtoParams):
# class _GoProtoParams(_SimpleProtoParams):
# class _PhpProtoParams(_SimpleProtoParams):
# class _RubyProtoParams(_SimpleProtoParams):
# class _PythonProtoParams(_SimpleProtoParams):
#     def __init__(self, language):
#     def code_root(self, output_dir):
#     def proto_plugin_path(self, plugin_args=None):
#     def plugin_out_param(self, output_dir, plugin_args=None):
#     def default_lang_out_value(self, with_grpc):
#     def lang_out_param(self, output_dir, with_grpc, language_out_override):
#     def grpc_plugin_path(self, dummy_toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def proto_plugin_path(self):
#     def plugin_out_param(self, output_dir, plugin_args=None):
#     def grpc_plugin_path(self, toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def default_lang_out_value(self, with_grpc):
#     def grpc_plugin_path(self, toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def grpc_plugin_path(self, dummy_toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def lang_out_param(self, output_dir, with_grpc, language_out_override):
#     def grpc_plugin_path(self, dummy_toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
# def protoc_binary_name(language):
# def group_by_go_package(proto_files):
#     def go_pkg(file):
# def protoc_header_params(proto_path,
#                           toolkit_path):
# def protoc_desc_params(output_dir, desc_out_file):
# def protoc_proto_params(proto_params, pkg_dir, gapic_yaml, with_grpc, language_out_override):
# def protoc_grpc_params(proto_params, pkg_dir, toolkit_path):
# def protoc_plugin_params(proto_params, pkg_dir, gapic_yaml):
# def protoc_common_resources_params(root_dir, common_resources=None):
# def find_google_dir_index(src_proto_path):
# def pkg_root_dir(output_dir, api_name, api_version, organization_name,
#                  language, prefix=None):
# def prepare_proto_pkg_dir(output_dir, api_name, api_version, organization_name,
#                           language):
# def prepare_grpc_pkg_dir(output_dir, api_name, api_version, organization_name,
#                          language):
# def prepare_pkg_dir(output_dir, api_name, api_version, organization_name,
#                     language, prefix):
# def find_protos(proto_paths, excluded_proto_path):
# def list_files_recursive(path):
# def php_proto_rename(contents):
# def _is_proto_excluded(proto, excluded_proto_path):
# def _find_protobuf_path(toolkit_path):
# PROTO_PARAMS_MAP = {
#     'ruby': _RubyProtoParams(),
#     'java': _JavaProtoParams(),
#     'go': _GoProtoParams(),
#     'csharp': _SimpleProtoParams('csharp'),
#     'php': _PhpProtoParams(),
#     'python': _PythonProtoParams(),
#     'nodejs': _SimpleProtoParams('nodejs'),
# }


import unittest
import os
from artman.utils import protoc_utils
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import



class FindProtoBinaryTest(unittest.TestCase):
    TESTDATA = os.path.join(
        os.path.realpath(os.path.dirname(__file__)), 'testdata')

    # Assert that the existing Dockerfile has a protoc binary.
    def test_protoc_binary_name_live(self):
        python_protoc = protoc_utils.protoc_binary_name('python')
        self.assertTrue(python_protoc)

    def test_parse_protoc_binary_name(self):
        for language in ['java', 'nodejs', 'php', 'go', 'python', 'ruby', 'csharp']:
            self._test(language)

    def _test(self, language):

# Path: artman/utils/protoc_utils.py
# class _SimpleProtoParams(object):
# class _JavaProtoParams(_SimpleProtoParams):
# class _GoProtoParams(_SimpleProtoParams):
# class _PhpProtoParams(_SimpleProtoParams):
# class _RubyProtoParams(_SimpleProtoParams):
# class _PythonProtoParams(_SimpleProtoParams):
#     def __init__(self, language):
#     def code_root(self, output_dir):
#     def proto_plugin_path(self, plugin_args=None):
#     def plugin_out_param(self, output_dir, plugin_args=None):
#     def default_lang_out_value(self, with_grpc):
#     def lang_out_param(self, output_dir, with_grpc, language_out_override):
#     def grpc_plugin_path(self, dummy_toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def proto_plugin_path(self):
#     def plugin_out_param(self, output_dir, plugin_args=None):
#     def grpc_plugin_path(self, toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def default_lang_out_value(self, with_grpc):
#     def grpc_plugin_path(self, toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def grpc_plugin_path(self, dummy_toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
#     def __init__(self):
#     def code_root(self, output_dir):
#     def lang_out_param(self, output_dir, with_grpc, language_out_override):
#     def grpc_plugin_path(self, dummy_toolkit_path):
#     def grpc_out_param(self, output_dir):
#     def proto_compiler_command(self):
# def protoc_binary_name(language):
# def group_by_go_package(proto_files):
#     def go_pkg(file):
# def protoc_header_params(proto_path,
#                           toolkit_path):
# def protoc_desc_params(output_dir, desc_out_file):
# def protoc_proto_params(proto_params, pkg_dir, gapic_yaml, with_grpc, language_out_override):
# def protoc_grpc_params(proto_params, pkg_dir, toolkit_path):
# def protoc_plugin_params(proto_params, pkg_dir, gapic_yaml):
# def protoc_common_resources_params(root_dir, common_resources=None):
# def find_google_dir_index(src_proto_path):
# def pkg_root_dir(output_dir, api_name, api_version, organization_name,
#                  language, prefix=None):
# def prepare_proto_pkg_dir(output_dir, api_name, api_version, organization_name,
#                           language):
# def prepare_grpc_pkg_dir(output_dir, api_name, api_version, organization_name,
#                          language):
# def prepare_pkg_dir(output_dir, api_name, api_version, organization_name,
#                     language, prefix):
# def find_protos(proto_paths, excluded_proto_path):
# def list_files_recursive(path):
# def php_proto_rename(contents):
# def _is_proto_excluded(proto, excluded_proto_path):
# def _find_protobuf_path(toolkit_path):
# PROTO_PARAMS_MAP = {
#     'ruby': _RubyProtoParams(),
#     'java': _JavaProtoParams(),
#     'go': _GoProtoParams(),
#     'csharp': _SimpleProtoParams('csharp'),
#     'php': _PhpProtoParams(),
#     'python': _PythonProtoParams(),
#     'nodejs': _SimpleProtoParams('nodejs'),
# }


# Path: test/util/test_find_protoc_binary.py
import unittest
import os
from artman.utils import protoc_utils

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import



class FindProtoBinaryTest(unittest.TestCase):
    TESTDATA = os.path.join(
        os.path.realpath(os.path.dirname(__file__)), 'testdata')

    # Assert that the existing Dockerfile has a protoc binary.
    def test_protoc_binary_name_live(self):
        python_protoc = protoc_utils.protoc_binary_name('python')
        self.assertTrue(python_protoc)

    def test_parse_protoc_binary_name(self):
        for language in ['java', 'nodejs', 'php', 'go', 'python', 'ruby', 'csharp']:
            self._test(language)

    def _test(self, language):

        protoc_binary = protoc_utils.protoc_binary_name(language)