예제 #1
0
        public void should_search_all_files_in_a_specific_folder_recursively()
        {
            IConfiguration configuration = new FakeConfiguration("c:\\code");
            ISearchFileManager searchFileManager = new SearchFileManager(configuration);

            List<string> files = searchFileManager.Search(true);

            Assert.That(files, Is.Not.Empty);
        }
예제 #2
0
        public void should_search_package_config_in_a_specific_folder_recursively()
        {
            IConfiguration configuration = new FakeConfiguration("c:\\code", "packages.config");
            ISearchFileManager searchFileManager = new SearchFileManager(configuration);

            List<string> files = searchFileManager.Search(true);

            Assert.That(files, Is.Not.Empty);
            Assert.IsTrue(files.All(x => x.EndsWith("packages.config")));
        }
예제 #3
0
        public void should_search_included_file_types_in_a_specific_folder_recursively()
        {
            IConfiguration configuration = new FakeConfiguration("c:\\code", "*.cs;*.js");
            ISearchFileManager searchFileManager = new SearchFileManager(configuration);

            List<string> files = searchFileManager.Search(true);

            Assert.That(files, Is.Not.Empty);
            Assert.IsTrue(files.All(x => x.EndsWith(".cs") || x.EndsWith(".js")));
        }