예제 #1
0
        public void EnsureThat_FsUtils_CopyDirectory_Fails_InvalidPath(string d1, string d2)
        {
            var source = new FsPath(d1);
            var target = new FsPath(d2);

            var result = source.CopyDirectory(target, TestEnvironment.GetMockedLog());

            Assert.IsFalse(result);
        }
예제 #2
0
        public void EnsureThat_FsUtils_CopyDirectory_Works()
        {
            var source = new FsPath(TestEnvironment.GetTestFolder());
            var target = new FsPath(_testDir, "copydir");

            var result = source.CopyDirectory(target, TestEnvironment.GetMockedLog());

            Assert.IsTrue(result);

            var files = Directory.GetFiles(Path.Combine(_testDir, "copydir"));

            Assert.AreEqual(6, files.Length);
        }