Ejemplo n.º 1
0
        private void Setup(string test, bool addFiles, bool deleteFiles, bool recursive)
        {
            var dataInput = Path.Combine(_dataPath, test, @"in");

            _testInput  = Path.Combine(_path, test, @"in");
            _testOutput = Path.Combine(_path, test, @"out");

            // Clear existing test data
            if (Directory.Exists(_testInput))
            {
                Directory.Delete(_testInput, true);
            }
            if (Directory.Exists(_testOutput))
            {
                Directory.Delete(_testOutput, true);
            }

            // Copy needed files from data directory
            TestHelper.CopyDirectory(_testInput, dataInput);

            _watcher = new Watcher(
                "SyncTest",
                _testInput,
                _testOutput,
                addFiles,
                deleteFiles,
                null,
                recursive
                );
        }