igor-tkachev / bltoolkit

Business Logic Toolkit for .NET
MIT License
297 stars 112 forks source link

FluentConfig.Configure doesn't cache results #326

Closed ili closed 9 years ago

ili commented 10 years ago

this would fail on second iteration:

        [TestMethod]
        public void ShouldConfigMapping()
        {
            for (int i = 1; i <= 2; i++)
            {
                ExtensionList extensions = new ExtensionList();
                FluentConfig.Configure(extensions)
                    .MapingFromAssemblyOf<FluentConfigTest>();

                Assert.IsTrue(extensions.ContainsKey(typeof (Dbo1).FullName), "Not mapping");
                Assert.IsFalse(extensions.ContainsKey(typeof (Dbo2).FullName), "Fail mapping for abstract");
                Assert.IsFalse(extensions.ContainsKey(typeof (Dbo3).FullName), "Fail mapping for generic");
            }
        }