# Path: nba_data/deserializers/utils/box_score_deserializer_utils.py
# class BoxScoreDeserializerUtils:
# 
#     def __init__(self):
#         pass
# 
#     @staticmethod
#     def parse_minutes_representation_to_seconds(minutes):
#         if minutes is None:
#             return 0
# 
#         if not isinstance(minutes, unicode):
#             raise ValueError("Expected a unicode minutes representation instead of %s", minutes)
# 
#         if ":" in minutes:
#             minutes_parts = minutes.split(":")
# 
#             if not len(minutes_parts) == 2:
#                 raise ValueError("Expected a minute and seconds part instead of %s", minutes_parts)
# 
#             return int(minutes_parts[0]) * 60 + int(minutes_parts[1])
# 
#         raise ValueError("Unknown minutes value: %s", minutes)


from unittest import TestCase
from nba_data.deserializers.utils.box_score_deserializer_utils import BoxScoreDeserializerUtils



class TestBoxScoreDeserializerUtils(TestCase):
    def test_instantiation(self):
        self.assertIsNotNone(BoxScoreDeserializerUtils())

    def test_parse_minutes_representation_to_seconds(self):
        self.assertEqual(BoxScoreDeserializerUtils.parse_minutes_representation_to_seconds(None), 0)
        self.assertEqual(BoxScoreDeserializerUtils.parse_minutes_representation_to_seconds(u"12:34"), 754)

# Path: nba_data/deserializers/utils/box_score_deserializer_utils.py
# class BoxScoreDeserializerUtils:
# 
#     def __init__(self):
#         pass
# 
#     @staticmethod
#     def parse_minutes_representation_to_seconds(minutes):
#         if minutes is None:
#             return 0
# 
#         if not isinstance(minutes, unicode):
#             raise ValueError("Expected a unicode minutes representation instead of %s", minutes)
# 
#         if ":" in minutes:
#             minutes_parts = minutes.split(":")
# 
#             if not len(minutes_parts) == 2:
#                 raise ValueError("Expected a minute and seconds part instead of %s", minutes_parts)
# 
#             return int(minutes_parts[0]) * 60 + int(minutes_parts[1])
# 
#         raise ValueError("Unknown minutes value: %s", minutes)


# Path: tests/test_boxScoreDeserializerUtils.py
from unittest import TestCase
from nba_data.deserializers.utils.box_score_deserializer_utils import BoxScoreDeserializerUtils




class TestBoxScoreDeserializerUtils(TestCase):
    def test_instantiation(self):
        self.assertIsNotNone(BoxScoreDeserializerUtils())

    def test_parse_minutes_representation_to_seconds(self):
        self.assertEqual(BoxScoreDeserializerUtils.parse_minutes_representation_to_seconds(None), 0)
        self.assertEqual(BoxScoreDeserializerUtils.parse_minutes_representation_to_seconds(u"12:34"), 754)

        self.assertRaises(ValueError, BoxScoreDeserializerUtils.parse_minutes_representation_to_seconds, 1234)