コード例 #1
0
        public void CopyFileExNonExistantBehaviors()
        {
            using (var cleaner = new TestFileCleaner())
            {
                string source      = cleaner.GetTestPath();
                string destination = cleaner.GetTestPath();

                Action action = () => FileMethods.CopyFileEx(source, destination);
                action.ShouldThrow <System.IO.FileNotFoundException>();

                source = Paths.Combine(source, "file");
                action.ShouldThrow <System.IO.DirectoryNotFoundException>();
            }
        }