Esempio n. 1
0
        public void ModuleInclusionCheckReturnsTrueWhenInIncludedList()
        {
            bool useIncludeList = true;
            var  settings       = new SymbolInclusionSettings(useIncludeList, new List <string>(),
                                                              new List <string>()
            {
                "includedModule"
            });

            Assert.That(settings.IsModuleIncluded("includedModule"), Is.True);
            Assert.That(settings.IsModuleIncluded("otherModule"), Is.False);
        }
Esempio n. 2
0
        public void ModuleInclusionCheckReturnsTrueWhenNotInExcludedList()
        {
            bool useIncludeList = false;
            var  settings       = new SymbolInclusionSettings(
                useIncludeList, new List <string>()
            {
                "excludedModule"
            }, new List <string>());

            Assert.That(settings.IsModuleIncluded("someModule"), Is.True);
            Assert.That(settings.IsModuleIncluded("excludedModule"), Is.False);
        }
Esempio n. 3
0
        public void ModuleInclusionCheckIsCaseInsensitive()
        {
            bool useIncludeList = true;
            var  settings       =
                new SymbolInclusionSettings(useIncludeList, new List <string>(),
                                            new List <string>()
            {
                "includedModule", "oneMore"
            });

            Assert.That(settings.IsModuleIncluded("INCLUDEDMODULE"), Is.True);
            Assert.That(settings.IsModuleIncluded("OnEmOrE"), Is.True);
        }
Esempio n. 4
0
        public void ModuleInclusionCheckAcceptsRegex()
        {
            bool useIncludeList = true;
            var  settings       = new SymbolInclusionSettings(useIncludeList, new List <string>(),
                                                              new List <string>()
            {
                "excluded*", "m?dule"
            });

            Assert.That(settings.IsModuleIncluded("excludedModule"), Is.True);
            Assert.That(settings.IsModuleIncluded("excluded"), Is.True);
            Assert.That(settings.IsModuleIncluded("excluded.dll"), Is.True);
            Assert.That(settings.IsModuleIncluded("Module"), Is.True);
            Assert.That(settings.IsModuleIncluded("Moodule"), Is.False);
            Assert.That(settings.IsModuleIncluded("SomeModule"), Is.False);
            Assert.That(settings.IsModuleIncluded("somethingexcluded"), Is.False);
        }