Esempio n. 1
0
        public async Task GetTableDataWithoutValidAuth()
        {
            AppTests.LoadTestVariables();
            var controller = new AdminInmuebles.Controllers.GenericFormsController()
            {
                AuthenticatedToken = _validJwtWithoutAdmin.ToJwt(true, true)
            };
            var result = await controller.GetTableData(_testTableName) as UnauthorizedObjectResult;

            Assert.IsNotNull(result);
        }
Esempio n. 2
0
        public async Task GetTableDetail()
        {
            AppTests.LoadTestVariables();
            var controller = new AdminInmuebles.Controllers.GenericFormsController()
            {
                AuthenticatedToken = _validJwt.ToJwt(true, true)
            };
            var result = await controller.GetTableDetail(_testTableName) as OkObjectResult;

            Assert.IsNotNull(result);
            var value = result.Value as IEnumerable <AdminInmuebles.Models.Campo>;

            Assert.IsNotNull(value);
        }