Exemplo n.º 1
0
        public async Task ResetUserPassword_GivenAValidAndExistingUserId_ShouldResetUserPassword()
        {
            var request = await DoPostRequest("api/user/resetuserpassword", ADMIN_USER_ID.ToString());

            request.EnsureSuccessStatusCode();

            var response = GetStructResult <bool>(await request.Content.ReadAsStringAsync());

            Assert.AreEqual(HttpStatusCode.OK, request.StatusCode);
            Assert.IsTrue(response);
        }
Exemplo n.º 2
0
        public async Task EditUser_GivenAValidUserDataToEdit_ShouldEditTheUserData()
        {
            var userdata = new UserViewDto
            {
                Id       = ADMIN_USER_ID.ToString(),
                Email    = "*****@*****.**",
                UserName = "******",
            };

            var request = await DoPostRequest("api/user/edituser", userdata);

            request.EnsureSuccessStatusCode();

            var response = GetStructResult <bool>(await request.Content.ReadAsStringAsync());

            Assert.AreEqual(HttpStatusCode.OK, request.StatusCode);
            Assert.IsTrue(response);
        }