コード例 #1
0
        public void Set_AssignesToSession()
        {
            // Arrange
            var player = new PlayerDto("", Guid.Empty);

            // Act
            _target.Set(player);

            // Assert
            _session.Received().Store(PlayerSession.SessionKey, player);
        }
コード例 #2
0
        public void Get_UserExists_ReturnsUser()
        {
            // Arrange
            var player = new PlayerDto("", Guid.Empty);
            _session.Get(PlayerSession.SessionKey).ReturnsForAnyArgs(player);

            // Act
            var result = _target.Get();

            // Assert
            Assert.AreEqual(player, result);
        }
コード例 #3
0
 public void Set(PlayerDto player)
 {
     _session.Store(SessionKey, player);
 }