コード例 #1
0
        public void StatManagerTest()
        {
            //Set The Path Of The ZSNES Save State File
            var _saveStatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"SaveState\nhl94.zs3");

            //Create An Instance Of The Stat Manager Passing In The Path Of The ZSNES Save State.
            var sm = new StatManager(_saveStatePath);

            Assert.True(sm!=null, "My Message");
        }
コード例 #2
0
        public void GenerateBoxScoreTest()
        {
            //Set The Path Of The ZSNES Save State File
            var _saveStatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"SaveState\nhl94.zs3");

            //Create An Instance Of The Stat Manager Passing In The Path Of The ZSNES Save State.
            var sm = new StatManager(_saveStatePath);

            //Generate The Boxscore
            var boxscore = sm.GenerateBoxScore();

            Assert.True(boxscore!=null, "BoxScore Generated");
        }
コード例 #3
0
        public void DisposeTest()
        {
            Boxscore boxscore;

            //Set The Path Of The ZSNES Save State File
            var _saveStatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"SaveState\nhl94.zs3");

            //Create An Instance Of The Stat Manager Passing In The Path Of The ZSNES Save State.
            var sm = new StatManager(_saveStatePath);

            //Call Dispose
            sm.Dispose();

            //Calling The GenerateBoxScore Method should fail as the FileStream Reader should be closed.
            Exception ex = Assert.Throws<System.ArgumentException>(() => boxscore = sm.GenerateBoxScore());

            //Verify The Expected Exception was thrown.
            Assert.Equal("Stream was not readable.", ex.Message);
        }