Example #1
0
        public bool IsAllowDownload(string email, string path)
        {
            string tableEndPoint = _settings.TableEndPoint;
            var    _tableService = new TableStorageService(tableEndPoint, _couserSASToken);

            return(_tableService.IsAllowedDownload(email, path));
        }
        public void IsAllowDownloadNo2Test()
        {
            string email = "*****@*****.**";
            string path  = "project/course01";
            TableStorageService service = new TableStorageService(_endPoint, _sasToken);
            bool isAllowed = service.IsAllowedDownload(email, path);

            Assert.IsFalse(isAllowed);
        }
        public void IsAllowDownloadYes2Test()
        {
            string email = "*****@*****.**";
            string path  = "mcts/demo";
            TableStorageService service = new TableStorageService(_endPoint, _sasToken);
            bool isAllowed = service.IsAllowedDownload(email, path);

            Assert.IsTrue(isAllowed);
        }