# This code has been automatically generated by:
# dev_scripts/test_codegen/generate_test_for_jsonization_of_enums.py
# Do NOT edit or append.


"""Test JSON de/serialization of enumeration literals."""


# pylint: disable=missing-docstring


import unittest

import aas_core3.jsonization as aas_jsonization


class Test_ModellingKind(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "Template"

        enum_literal = aas_jsonization.modelling_kind_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_QualifierKind(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "ValueQualifier"

        enum_literal = aas_jsonization.qualifier_kind_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_AssetKind(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "Type"

        enum_literal = aas_jsonization.asset_kind_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_AASSubmodelElements(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "AnnotatedRelationshipElement"

        enum_literal = aas_jsonization.aas_submodel_elements_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_EntityType(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "CoManagedEntity"

        enum_literal = aas_jsonization.entity_type_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_Direction(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "input"

        enum_literal = aas_jsonization.direction_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_StateOfEvent(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "on"

        enum_literal = aas_jsonization.state_of_event_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_ReferenceTypes(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "ExternalReference"

        enum_literal = aas_jsonization.reference_types_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_KeyTypes(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "AnnotatedRelationshipElement"

        enum_literal = aas_jsonization.key_types_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_DataTypeDefXSD(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "xs:anyURI"

        enum_literal = aas_jsonization.data_type_def_xsd_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


class Test_DataTypeIEC61360(unittest.TestCase):
    def test_round_trip(self) -> None:
        jsonable = "DATE"

        enum_literal = aas_jsonization.data_type_iec_61360_from_jsonable(jsonable)

        self.assertEqual(enum_literal.value, jsonable)


if __name__ == "__main__":
    unittest.main()


# This code has been automatically generated by:
# dev_scripts/test_codegen/generate_test_for_jsonization_of_enums.py
# Do NOT edit or append.
