public void ExtractSettingsTypes_WhenTypeHasSettingsSuffixIndications_ShouldExtractType()
        {
            var sut = new SettingsTypesExtractor();

            var assemblyCollection = MockAssemblies(typeof(IIndicationInterfaceSettings));

            var results = sut.ExtractSettingsTypes(assemblyCollection, new SettingsOptions());

            Assert.Contains(typeof(IIndicationInterfaceSettings), results);
        }
        public void ExtractSettingsTypes_WhenTypeHasNoIndications_ShouldNotExtractType()
        {
            var sut = new SettingsTypesExtractor();

            var assemblyCollection = MockAssemblies(typeof(INonIndicationInterface));

            var results = sut.ExtractSettingsTypes(assemblyCollection, new SettingsOptions());

            Assert.DoesNotContain(typeof(INonIndicationInterface), results);
        }
示例#3
0
        public void ExtractSettingsTypes_WhenTypeHasNonDefaultSuffixIndidation_ShouldExtractType()
        {
            var sut = new SettingsTypesExtractor();

            var assemblyCollection = MockAssemblies(typeof(INonDefaultSuffixIndicationInterfaceSomeSuffix));

            var results = sut.ExtractSettingsTypes(assemblyCollection, new SettingsOptions()
            {
                SettingsSuffix = "SomeSuffix"
            });

            Assert.Contains(typeof(INonDefaultSuffixIndicationInterfaceSomeSuffix), results);
        }
示例#4
0
        public void ExtractSettingsTypes_WhenTypeHasNonDefaultInterfaceIndidation_ShouldExtractType()
        {
            var sut = new SettingsTypesExtractor();

            var assemblyCollection = MockAssemblies(typeof(INonDefaultInterfaceInterface));

            var results = sut.ExtractSettingsTypes(assemblyCollection, new SettingsOptions()
            {
                InterfaceBase = typeof(INonDefaultInterfaceIndication)
            });

            Assert.Contains(typeof(INonDefaultInterfaceInterface), results);
        }