예제 #1
0
        public void SessionLogic_CreateSession()
        {
            // Arrange
            State.Sessions.Clear();
            var sessionLogic = new SessionLogic();

            // Act
            var session = sessionLogic.CreateSession();

            // Assert
            Assert.AreEqual(session.Rank, RankEnum.Beginner);
            Assert.AreEqual(session.Level, 1);
            Assert.AreEqual(State.Sessions.Count, 1);
        }
예제 #2
0
        public void SessionLogic_EndSession()
        {
            // Arrange
            State.Sessions.Clear();
            var sessionLogic = new SessionLogic();
            var session      = sessionLogic.CreateSession();

            Assert.AreEqual(State.Sessions.Count, 1);

            // Act
            sessionLogic.EndSession(session);

            // Assert
            Assert.AreEqual(State.Sessions.Count, 0);
        }