Exemplo n.º 1
0
        private Guid GetUserId(string userName)
        {
            User user = BusinessLogicConverter.ToUser(userName);

            UserProcessor.LogIn(user);
            return(user.Id);
        }
Exemplo n.º 2
0
        public override void Execute()
        {
            User user = BusinessLogicConverter.ToUser(UserName);

            UserProcessor.LogIn(user);
            Result = user.Id;

            Logger.Trace(string.Format("User '{0}' has been logged in. UserId: {1}", UserName, user.Id));
        }
Exemplo n.º 3
0
        public void ToUser_GoodText_ReturnsUser(string userName)
        {
            User result = BusinessLogicConverter.ToUser(userName);

            Assert.Equal(userName, result.Name);
        }
Exemplo n.º 4
0
        public void ToUser_BadText_Throws(string userName)
        {
            Exception result = Assert.Throws <ArgumentException>(() => BusinessLogicConverter.ToUser(userName));

            Assert.IsType(typeof(ArgumentException), result);
        }