Example #1
0
        public void TestCopyTo()
        {
            var fileToCopyPath = Path.Combine(TestTempPath, "TestCopy.crz3");
            var copiedFilePath = Path.Combine(TestTempPath, "TestCopy2.crz3");

            try
            {
                using (var dal = new CruiseDatastore_V3(fileToCopyPath, true))
                {
                    dal.CopyTo(copiedFilePath);

                    File.Exists(copiedFilePath).Should().BeTrue();
                }
            }
            finally
            {
                if (File.Exists(fileToCopyPath))
                {
                    File.Delete(fileToCopyPath);
                }
                if (File.Exists(copiedFilePath))
                {
                    File.Delete(copiedFilePath);
                }
            }
        }