Example #1
0
        public void stDeleteDirectoryTest1()
        {
            var target = new FileComponentDeleteDirectoryAccessor();

            try {
                target.parse("[File delete.directory(\"dir\")]");
                Assert.Fail("1");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(ArgumentPMException), ex.GetType().ToString()); }

            try {
                target.parse("[File delete.directory(\"  \", false)]");
                Assert.Fail("2");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(InvalidArgumentException), ex.GetType().ToString()); }
        }
Example #2
0
        public void stDeleteDirectoryTest1()
        {
            var target = new FileComponentDeleteDirectoryAccessor();

            try {
                target.parse("[File delete.directory(\"dir\")]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(ArgumentPMException), ex.GetType().ToString()); }

            try {
                target.parse("[File delete.directory(\"  \", false)]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(InvalidArgumentException), ex.GetType().ToString()); }
        }