Esempio n. 1
0
        public void TestCacheAll()
        {
            var cache = new ReflectionCache();

            cache.CacheFromBinder(this.binder);

            Assert.True(cache.Contains(typeof(MockIClassWithAttributes)));
            Assert.True(cache.Contains(typeof(MockClassWithDependencies)));
        }
Esempio n. 2
0
        public void TestAddType()
        {
            var cache = new ReflectionCache();
            var type  = typeof(MockIClassWithoutAttributes);

            cache.Add(type);

            Assert.True(cache.Contains(type));
        }
Esempio n. 3
0
        public void ReflectionCacheRemove_RemoveType_Correct()
        {
            //Arrange
            ReflectionCache reflectionCache = new ReflectionCache();

            //Act
            reflectionCache.Remove(typeof(someClass_f));
            //Assert
            Assert.AreEqual(false, reflectionCache.Contains(typeof(someClass_f)));
        }