Esempio n. 1
0
        public async Task LoginUser_CorrectUserData_ReturnAToken()
        {
            var login = await UsersControl.LoginUser(GoodUser);

            Assert.IsInstanceOf(typeof(Token), login.Data);
        }
Esempio n. 2
0
        public async Task LoginUser_UncorrectUserData_LoginFailedMessage()
        {
            var login = await UsersControl.LoginUser(WrongUser);

            Assert.AreEqual("Wrong login or password!", login.ClientError);
        }
Esempio n. 3
0
        public async Task LoginUser_UncorrectUserData_LoginStatusFailed()
        {
            var login = await UsersControl.LoginUser(WrongUser);

            Assert.AreEqual(System.Net.HttpStatusCode.BadRequest, login.StatusCode);
        }
Esempio n. 4
0
        public async Task LoginUser_CorrectUserData_LoginSuccesMessage()
        {
            var login = await UsersControl.LoginUser(GoodUser);

            Assert.AreEqual("You are logged in!", login.SuccessMessage);
        }