Exemplo n.º 1
0
        public void Ctor_should_persist_path_to_path_property()
        {
            var knownPath =
                Environment.GetFolderPath(Environment.SpecialFolder.Windows);

            var scanner =
                new DirectoryTypeScanner(knownPath);

            scanner.Path.ShouldEqual(knownPath);
        }
        public void Ctor_should_persist_path_to_path_property()
        {
            var knownPath =
                Environment.GetFolderPath(Environment.SpecialFolder.Windows);

            var scanner =
                new DirectoryTypeScanner(knownPath);

            scanner.Path.ShouldEqual(knownPath);
        }
Exemplo n.º 3
0
        public void GetTypes_should_return_empty_enumerable_when_no_assemblies_were_found_in_path()
        {
            var tempDirectoryPath =
                Path.Combine(Path.GetTempPath(),
                             Path.GetFileNameWithoutExtension(Path.GetRandomFileName()));

            Directory.CreateDirectory(tempDirectoryPath);

            var scanner =
                new DirectoryTypeScanner(tempDirectoryPath);

            var results =
                scanner.GetTypes(x => true);

            results.Count().ShouldEqual(0);
        }
        public void GetTypes_should_return_empty_enumerable_when_no_assemblies_were_found_in_path()
        {
            var tempDirectoryPath =
                Path.Combine(Path.GetTempPath(),
                Path.GetFileNameWithoutExtension(Path.GetRandomFileName()));

            Directory.CreateDirectory(tempDirectoryPath);

            var scanner =
                new DirectoryTypeScanner(tempDirectoryPath);

            var results =
                scanner.GetTypes(x => true);

            results.Count().ShouldEqual(0);
        }