# Path: nba_data/nba_stats_api_utils/uri_generator.py
# class UriGenerator:
#     date_format = "%Y%m%d"
#     stats_base_uri = "http://stats.nba.com/stats/"
#     stats_prod_base_uri = "http://stats-prod.nba.com/wp-json/statscms/v1/"
#     data_base_uri = "http://data.nba.net/"
# 
#     common_all_players_path = "commonallplayers"
#     team_game_log_path = "teamgamelog"
#     common_player_info_path = "commonplayerinfo"
#     advanced_box_score_path = "boxscoreadvancedv2"
#     traditional_box_score_path = "boxscoretraditionalv2"
#     calendar_path = "calendar"
#     scoreboard_path = "scoreboard"
#     players_path = "players"
#     roto_wire_player_news_path = "rotowire/player"
# 
#     def __init__(self):
#         pass
# 
#     @staticmethod
#     def generate_common_all_players_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.common_all_players_path
# 
#     @staticmethod
#     def generate_team_game_log_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.team_game_log_path
# 
#     @staticmethod
#     def generate_common_player_info_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.common_player_info_path
# 
#     @staticmethod
#     def generate_advanced_box_score_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.advanced_box_score_path
# 
#     @staticmethod
#     def generate_traditional_box_score_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.traditional_box_score_path
# 
#     @staticmethod
#     def generate_data_uri(path):
#         return UriGenerator.data_base_uri + 'data/10s/prod/v1/' + path + '.json'
# 
#     @staticmethod
#     def generate_calendar_data_uri():
#         return UriGenerator.generate_data_uri(path=UriGenerator.calendar_path)
# 
#     @staticmethod
#     def generate_scoreboard_data_uri(date_value):
#         assert isinstance(date_value, date)
# 
#         path = date_value.strftime(UriGenerator.date_format) + '/' + UriGenerator.scoreboard_path
#         return UriGenerator.generate_data_uri(path=path)
# 
#     @staticmethod
#     def generate_players_data_uri(season):
#         assert isinstance(season, Season)
# 
#         path = str(Season.get_start_year_by_season(season=season)) + '/' + UriGenerator.players_path
#         return UriGenerator.generate_data_uri(path=path)
# 
#     @staticmethod
#     def generate_roto_wire_player_news_uri():
#         return UriGenerator.stats_prod_base_uri + '/' + UriGenerator.roto_wire_player_news_path


from datetime import date
from unittest import TestCase
from nba_data.nba_stats_api_utils.uri_generator import UriGenerator



class TestUriGenerator(TestCase):
    def test_instantiation(self):
        self.assertIsNotNone(UriGenerator())

    def test_generate_common_all_players_uri(self):
        self.assertEqual(UriGenerator.generate_common_all_players_uri(), "http://stats.nba.com/stats/commonallplayers")

    def test_generate_team_game_log_uri(self):
        self.assertEqual(UriGenerator.generate_team_game_log_uri(), "http://stats.nba.com/stats/teamgamelog")

    def test_generate_common_player_info_uri(self):
        self.assertEqual(UriGenerator.generate_common_player_info_uri(), "http://stats.nba.com/stats/commonplayerinfo")

    def test_generate_advanced_box_score_uri(self):
        self.assertEqual(UriGenerator.generate_advanced_box_score_uri(), "http://stats.nba.com/stats/boxscoreadvancedv2")

    def test_generate_traditional_box_score_uri(self):

# Path: nba_data/nba_stats_api_utils/uri_generator.py
# class UriGenerator:
#     date_format = "%Y%m%d"
#     stats_base_uri = "http://stats.nba.com/stats/"
#     stats_prod_base_uri = "http://stats-prod.nba.com/wp-json/statscms/v1/"
#     data_base_uri = "http://data.nba.net/"
# 
#     common_all_players_path = "commonallplayers"
#     team_game_log_path = "teamgamelog"
#     common_player_info_path = "commonplayerinfo"
#     advanced_box_score_path = "boxscoreadvancedv2"
#     traditional_box_score_path = "boxscoretraditionalv2"
#     calendar_path = "calendar"
#     scoreboard_path = "scoreboard"
#     players_path = "players"
#     roto_wire_player_news_path = "rotowire/player"
# 
#     def __init__(self):
#         pass
# 
#     @staticmethod
#     def generate_common_all_players_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.common_all_players_path
# 
#     @staticmethod
#     def generate_team_game_log_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.team_game_log_path
# 
#     @staticmethod
#     def generate_common_player_info_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.common_player_info_path
# 
#     @staticmethod
#     def generate_advanced_box_score_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.advanced_box_score_path
# 
#     @staticmethod
#     def generate_traditional_box_score_uri():
#         return UriGenerator.stats_base_uri + UriGenerator.traditional_box_score_path
# 
#     @staticmethod
#     def generate_data_uri(path):
#         return UriGenerator.data_base_uri + 'data/10s/prod/v1/' + path + '.json'
# 
#     @staticmethod
#     def generate_calendar_data_uri():
#         return UriGenerator.generate_data_uri(path=UriGenerator.calendar_path)
# 
#     @staticmethod
#     def generate_scoreboard_data_uri(date_value):
#         assert isinstance(date_value, date)
# 
#         path = date_value.strftime(UriGenerator.date_format) + '/' + UriGenerator.scoreboard_path
#         return UriGenerator.generate_data_uri(path=path)
# 
#     @staticmethod
#     def generate_players_data_uri(season):
#         assert isinstance(season, Season)
# 
#         path = str(Season.get_start_year_by_season(season=season)) + '/' + UriGenerator.players_path
#         return UriGenerator.generate_data_uri(path=path)
# 
#     @staticmethod
#     def generate_roto_wire_player_news_uri():
#         return UriGenerator.stats_prod_base_uri + '/' + UriGenerator.roto_wire_player_news_path


# Path: tests/test_uriGenerator.py
from datetime import date
from unittest import TestCase
from nba_data.nba_stats_api_utils.uri_generator import UriGenerator




class TestUriGenerator(TestCase):
    def test_instantiation(self):
        self.assertIsNotNone(UriGenerator())

    def test_generate_common_all_players_uri(self):
        self.assertEqual(UriGenerator.generate_common_all_players_uri(), "http://stats.nba.com/stats/commonallplayers")

    def test_generate_team_game_log_uri(self):
        self.assertEqual(UriGenerator.generate_team_game_log_uri(), "http://stats.nba.com/stats/teamgamelog")

    def test_generate_common_player_info_uri(self):
        self.assertEqual(UriGenerator.generate_common_player_info_uri(), "http://stats.nba.com/stats/commonplayerinfo")

    def test_generate_advanced_box_score_uri(self):
        self.assertEqual(UriGenerator.generate_advanced_box_score_uri(), "http://stats.nba.com/stats/boxscoreadvancedv2")

    def test_generate_traditional_box_score_uri(self):

        self.assertEqual(UriGenerator.generate_traditional_box_score_uri(), "http://stats.nba.com/stats/boxscoretraditionalv2")