# Path: string_utils/manipulation.py
# def roman_encode(input_number: Union[str, int]) -> str:
#     """
#     Convert the given number/string into a roman number.
# 
#     The passed input must represents a positive integer in the range 1-3999 (inclusive).
# 
#     Why this limit? You may be wondering:
# 
#     1. zero is forbidden since there is no related representation in roman numbers
#     2. the upper bound 3999 is due to the limitation in the ascii charset\
#     (the higher quantity sign displayable in ascii is "M" which is equal to 1000, therefore based on\
#     roman numbers rules we can use 3 times M to reach 3000 but we can't go any further in thousands without\
#     special "boxed chars").
# 
#     *Examples:*
# 
#     >>> roman_encode(37) # returns 'XXXVIII'
#     >>> roman_encode('2020') # returns 'MMXX'
# 
#     :param input_number: An integer or a string to be converted.
#     :type input_number: Union[str, int]
#     :return: Roman number string.
#     """
#     return __RomanNumbers.encode(input_number)


from unittest import TestCase
from string_utils.manipulation import roman_encode



class RomanEncodeTestCase(TestCase):
    def test_encode_throws_an_exception_if_number_is_less_than_1(self):
        self.assertRaises(ValueError, lambda: roman_encode(0))
        self.assertRaises(ValueError, lambda: roman_encode(-12))

    def test_encode_throws_an_exception_if_number_is_decimal(self):
        # noinspection PyTypeChecker
        self.assertRaises(ValueError, lambda: roman_encode(1.1))

        # noinspection PyTypeChecker
        self.assertRaises(ValueError, lambda: roman_encode(-4.3))


# Path: string_utils/manipulation.py
# def roman_encode(input_number: Union[str, int]) -> str:
#     """
#     Convert the given number/string into a roman number.
# 
#     The passed input must represents a positive integer in the range 1-3999 (inclusive).
# 
#     Why this limit? You may be wondering:
# 
#     1. zero is forbidden since there is no related representation in roman numbers
#     2. the upper bound 3999 is due to the limitation in the ascii charset\
#     (the higher quantity sign displayable in ascii is "M" which is equal to 1000, therefore based on\
#     roman numbers rules we can use 3 times M to reach 3000 but we can't go any further in thousands without\
#     special "boxed chars").
# 
#     *Examples:*
# 
#     >>> roman_encode(37) # returns 'XXXVIII'
#     >>> roman_encode('2020') # returns 'MMXX'
# 
#     :param input_number: An integer or a string to be converted.
#     :type input_number: Union[str, int]
#     :return: Roman number string.
#     """
#     return __RomanNumbers.encode(input_number)


# Path: tests/test_roman_encode.py
from unittest import TestCase
from string_utils.manipulation import roman_encode




class RomanEncodeTestCase(TestCase):
    def test_encode_throws_an_exception_if_number_is_less_than_1(self):
        self.assertRaises(ValueError, lambda: roman_encode(0))
        self.assertRaises(ValueError, lambda: roman_encode(-12))

    def test_encode_throws_an_exception_if_number_is_decimal(self):
        # noinspection PyTypeChecker
        self.assertRaises(ValueError, lambda: roman_encode(1.1))

        # noinspection PyTypeChecker
        self.assertRaises(ValueError, lambda: roman_encode(-4.3))


    def test_encode_throws_an_exception_if_input_is_not_a_number(self):