Exemplo n.º 1
0
        public void ThemTaiKhoan_TestStatusResponse()
        {
            var newAccount = data_test.TaiKhoan();
            // Act
            IHttpActionResult actionResult = controller.ThemTaiKhoan(newAccount);
            var actual_result = actionResult as NegotiatedContentResult <string>;

            // Assert
            try
            {
                Assert.AreEqual("Thêm tài khoản thành công!", actual_result.Content);
            }
            catch (System.Exception)
            {
                var actual_result2 = actionResult as BadRequestErrorMessageResult;
                Assert.AreEqual("Thêm tài khoản thất bại!", actual_result2.Message);
            }
        }