public void SetUp()
 {
     _parentControl        = A.Fake <ILeaguesTreeViewViewModel>();
     _controlService       = A.Fake <ISeasonStandingsControlService>();
     _league               = new League();
     _conferenceRepository = A.Fake <IRepository <Conference> >();
     _sharedService        = A.Fake <ISharedService>();
 }
        /// <summary>
        /// Initializes a new instance of the StandingsControlViewModel class
        /// </summary>
        /// <param name="controlService"></param>
        public SeasonStandingsControlViewModel(ISharedService sharedService,
                                               ISeasonStandingsControlService controlService, IRepository <Conference> conferenceRepository)
            : base(sharedService)
        {
            _controlService       = controlService;
            _conferenceRepository = conferenceRepository;

            _leaguesTreeViewViewModel = null;
        }
        /// <summary>
        /// Initializes a new instance of the LeagueNodeViewModel class.
        /// </summary>
        /// <param name="parentControl"></param>
        /// <param name="controlService"></param>
        /// <param name="league"></param>
        /// <param name="conferenceRepository"></param>
        /// <param name="sharedService"></param>
        /// <param name="lazyLoadChildren"></param>
        public LeagueNodeViewModel(ILeaguesTreeViewViewModel parentControl,
                                   ISeasonStandingsControlService controlService, League league,
                                   IRepository <Conference> conferenceRepository, ISharedService sharedService = null,
                                   bool lazyLoadChildren = true)
            : base(null, controlService, sharedService, lazyLoadChildren)
        {
            _parentControl = parentControl ?? throw new ArgumentNullException("parentControl");
            _league        = league ?? throw new ArgumentNullException("league");

            _conferenceRepository = conferenceRepository;
        }
        private void ViewStandings()
        {
            try
            {
                Standings = null;

                var leagues = _controlService.GetLeaguesBySeason((int)WpfGlobals.SelectedSeason);

                _leaguesTreeViewViewModel = new LeaguesTreeViewViewModel(this, _controlService, leagues,
                                                                         _conferenceRepository);
                LeagueNodes = _leaguesTreeViewViewModel.LeagueNodes;
            }
            catch (Exception ex)
            {
                _sharedService.ShowExceptionMessage(ex);
            }
        }