# Path: releasetool/commands/tag/dotnet.py
# RELEASE_LINE_PATTERN = r"^(?:- )?Release ([^ ]*) version (\d+\.\d+.\d+(-[^ ]*)?)$"
# 
# def kokoro_job_name(upstream_repo: str, package_name: str) -> Union[str, None]:
#     """Return the Kokoro job name.
# 
#     Args:
#         upstream_repo (str): The GitHub repo in the form of `<owner>/<repo>`
#         package_name (str): The name of package to release
# 
#     Returns:
#         The name of the Kokoro job to trigger or None if there is no job to trigger
#     """
#     return None
# 
# def package_name(pull: dict) -> Union[str, None]:
#     return None


import pytest
import re
from releasetool.commands.tag.dotnet import (
    RELEASE_LINE_PATTERN,
    kokoro_job_name,
    package_name,
)
# 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.




release_triggering_lines = [
    ("Release Google.LongRunning version 1.2.3", "Google.LongRunning", "1.2.3"),
    (
        "Release Google.LongRunning version 1.2.3-beta01",
        "Google.LongRunning",
        "1.2.3-beta01",
    ),
    ("- Release Google.LongRunning version 1.2.3", "Google.LongRunning", "1.2.3"),
]

non_release_triggering_lines = [
    ("Release new version of all OsLogin packages"),
    ("Release all OsLogin packages version 1.2.3"),
    ("Release Google.LongRunning version 1.0"),
    ("Release Google.LongRunning version 1.2.3 and 1.2.4"),
]


@pytest.mark.parametrize("line,package,version", release_triggering_lines)
def test_release_line_regex_matching(line, package, version):
    """
    The regex can extract a well-formatted package and version
    """

# Path: releasetool/commands/tag/dotnet.py
# RELEASE_LINE_PATTERN = r"^(?:- )?Release ([^ ]*) version (\d+\.\d+.\d+(-[^ ]*)?)$"
# 
# def kokoro_job_name(upstream_repo: str, package_name: str) -> Union[str, None]:
#     """Return the Kokoro job name.
# 
#     Args:
#         upstream_repo (str): The GitHub repo in the form of `<owner>/<repo>`
#         package_name (str): The name of package to release
# 
#     Returns:
#         The name of the Kokoro job to trigger or None if there is no job to trigger
#     """
#     return None
# 
# def package_name(pull: dict) -> Union[str, None]:
#     return None


# Path: tests/commands/tag/test_tag_dotnet.py
import pytest
import re
from releasetool.commands.tag.dotnet import (
    RELEASE_LINE_PATTERN,
    kokoro_job_name,
    package_name,
)

# 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.




release_triggering_lines = [
    ("Release Google.LongRunning version 1.2.3", "Google.LongRunning", "1.2.3"),
    (
        "Release Google.LongRunning version 1.2.3-beta01",
        "Google.LongRunning",
        "1.2.3-beta01",
    ),
    ("- Release Google.LongRunning version 1.2.3", "Google.LongRunning", "1.2.3"),
]

non_release_triggering_lines = [
    ("Release new version of all OsLogin packages"),
    ("Release all OsLogin packages version 1.2.3"),
    ("Release Google.LongRunning version 1.0"),
    ("Release Google.LongRunning version 1.2.3 and 1.2.4"),
]


@pytest.mark.parametrize("line,package,version", release_triggering_lines)
def test_release_line_regex_matching(line, package, version):
    """
    The regex can extract a well-formatted package and version
    """

    match = re.search(RELEASE_LINE_PATTERN, line)