Esempio n. 1
0
        public void TestCreateFolder()
        {
            TreeNode el = new TreeNode(0, "Creating digital images folder");

            if (!Regex.IsMatch(el.Name, @"^[a-zA-Z ]+$"))
            {
                Assert.Fail();
            }
            ValidationController validation = new ValidationController();
            var isValid = validation.IsFolderNameUnique(el);

            isValid.Should().BeOfType <JsonResult>();
            if (!Convert.ToBoolean(isValid.Data))
            {
                Assert.Fail();
            }
        }