# Path: rest_framework_json_schema/transforms.py
# class CamelCaseTransform(Transform):
#     """Transform snake_underscore_case to camelCase."""
# 
#     def transform(self, name: str) -> str:
#         """Transform snake_underscore_case to camelCase."""
#         split = name.split("_")
#         return split[0] + "".join([_upper(c) for c in split[1:]])
# 
# class CamelCaseToUnderscoreTransform(Transform):
#     """Transform camelCase to snake_underscore_case."""
# 
#     def transform(self, name: str) -> str:
#         """Transform camelCase to snake_underscore_case."""
#         words: List[str] = []
#         last = 0
# 
#         for i, c in enumerate(name):
#             if c[0].isupper():
#                 # Start of a new word
#                 words.append(name[last].lower() + name[last + 1 : i])
#                 last = i
#         # Add the last word
#         words.append(name[last].lower() + name[last + 1 :])
# 
#         return "_".join(words)


from rest_framework_json_schema.transforms import (
    CamelCaseTransform,
    CamelCaseToUnderscoreTransform,
)


def test_camel_case_transform() -> None:
    tx = CamelCaseTransform()

    assert tx.transform("one") == "one"
    assert tx.transform("one_two_three") == "oneTwoThree"


def test_camel_case_to_underscore_transform() -> None:

# Path: rest_framework_json_schema/transforms.py
# class CamelCaseTransform(Transform):
#     """Transform snake_underscore_case to camelCase."""
# 
#     def transform(self, name: str) -> str:
#         """Transform snake_underscore_case to camelCase."""
#         split = name.split("_")
#         return split[0] + "".join([_upper(c) for c in split[1:]])
# 
# class CamelCaseToUnderscoreTransform(Transform):
#     """Transform camelCase to snake_underscore_case."""
# 
#     def transform(self, name: str) -> str:
#         """Transform camelCase to snake_underscore_case."""
#         words: List[str] = []
#         last = 0
# 
#         for i, c in enumerate(name):
#             if c[0].isupper():
#                 # Start of a new word
#                 words.append(name[last].lower() + name[last + 1 : i])
#                 last = i
#         # Add the last word
#         words.append(name[last].lower() + name[last + 1 :])
# 
#         return "_".join(words)


# Path: tests/test_transforms.py
from rest_framework_json_schema.transforms import (
    CamelCaseTransform,
    CamelCaseToUnderscoreTransform,
)



def test_camel_case_transform() -> None:
    tx = CamelCaseTransform()

    assert tx.transform("one") == "one"
    assert tx.transform("one_two_three") == "oneTwoThree"


def test_camel_case_to_underscore_transform() -> None:

    tx = CamelCaseToUnderscoreTransform()