コード例 #1
0
        public void ScoringSummaryManagerTest()
        {
            var _saveStatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"SaveState\nhl94.zs3");
            var _statreader = new StatReader(_saveStatePath);

            var SSM = new ScoringSummaryManager(_statreader);

            Assert.True(SSM != null, "ScoringSummary Manager Created");
        }
コード例 #2
0
        public void GetScoringSummaryTest()
        {
            var _saveStatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"SaveState\nhl94.zs3");
            var _statreader = new StatReader(_saveStatePath);

            var SSM = new ScoringSummaryManager(_statreader);
            var SSmodel = SSM.GetScoringSummary();
            var _boxscore = new Boxscore();
            _boxscore.scoringsummary = SSmodel;

            Assert.True(_boxscore.scoringsummary != null, "ScoringSummary Model & Boxscore Created");
        }
コード例 #3
0
        public void DisposeTest()
        {
            var _saveStatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"SaveState\nhl94.zs3");
            var _statreader = new StatReader(_saveStatePath);

            var SSM = new ScoringSummaryManager(_statreader);
            var SSmodel = new ScoringSummaryModel();

            //Call Dispose
            SSM.Dispose();

            //Calling The GetScoringSummary Method should fail as the FileStream Reader should be null.
            Exception ex = Assert.Throws<System.NullReferenceException>(() => SSmodel = SSM.GetScoringSummary());

            //Verify The Expected Exception was thrown.
            Assert.Equal("Object reference not set to an instance of an object.", ex.Message);
        }
コード例 #4
0
 private void GetScoringSummary()
 {
     var SSM = new ScoringSummaryManager(_statreader);
     var SSmodel = SSM.GetScoringSummary();
     _boxscore.scoringsummary = SSmodel;
     SSM.Dispose();
 }