# Path: prestans/devel/gen/closure.py
# def udl_to_cc(text, ignore_first=False):
#     text = text.lower()
#     camel_case = re.sub(r"_(.)", lambda pat: pat.group(1).upper(), text)
#     if not ignore_first:
#         camel_case = camel_case[0:1].upper()+camel_case[1:]
#     return camel_case


import unittest
from prestans.devel.gen.closure import udl_to_cc



class ClosureTest(unittest.TestCase):

    def test_udl_to_cc(self):
        self.assertEqual(udl_to_cc("name"), "Name")
        self.assertEqual(udl_to_cc("first_name"), "FirstName")
        self.assertEqual(udl_to_cc("last_name"), "LastName")

# Path: prestans/devel/gen/closure.py
# def udl_to_cc(text, ignore_first=False):
#     text = text.lower()
#     camel_case = re.sub(r"_(.)", lambda pat: pat.group(1).upper(), text)
#     if not ignore_first:
#         camel_case = camel_case[0:1].upper()+camel_case[1:]
#     return camel_case


# Path: tests/devel/gen/closure/test_closure.py
import unittest
from prestans.devel.gen.closure import udl_to_cc




class ClosureTest(unittest.TestCase):

    def test_udl_to_cc(self):
        self.assertEqual(udl_to_cc("name"), "Name")
        self.assertEqual(udl_to_cc("first_name"), "FirstName")
        self.assertEqual(udl_to_cc("last_name"), "LastName")

        self.assertEqual(udl_to_cc("last_name_field"), "LastNameField")