コード例 #1
0
        public void Can_create_instance_with_valid_context_and_cache_types()
        {
            var attribute = new DbMappingViewCacheTypeAttribute(typeof(SampleContext), typeof(SampleMappingViewCache));

            Assert.Same(typeof(SampleContext), attribute.ContextType);
            Assert.Same(typeof(SampleMappingViewCache), attribute.CacheType);
        }
コード例 #2
0
        public void Can_create_instance_with_valid_context_and_cache_types()
        {
            var attribute = new DbMappingViewCacheTypeAttribute(typeof(SampleContext), typeof(SampleMappingViewCache));

            Assert.Same(typeof(SampleContext), attribute.ContextType);
            Assert.Same(typeof(SampleMappingViewCache), attribute.CacheType);
        }
コード例 #3
0
        public void Can_create_instance_with_valid_context_type_and_cache_type_name()
        {
            var cacheTypeName = typeof(SampleMappingViewCache).AssemblyQualifiedName;
            var attribute = new DbMappingViewCacheTypeAttribute(typeof(SampleContext), cacheTypeName);

            Assert.Same(typeof(SampleContext), attribute.ContextType);
            Assert.Same(typeof(SampleMappingViewCache), attribute.CacheType);
        }
コード例 #4
0
        public void Can_create_instance_with_valid_context_type_and_cache_type_name()
        {
            var cacheTypeName = typeof(SampleMappingViewCache).AssemblyQualifiedName;
            var attribute     = new DbMappingViewCacheTypeAttribute(typeof(SampleContext), cacheTypeName);

            Assert.Same(typeof(SampleContext), attribute.ContextType);
            Assert.Same(typeof(SampleMappingViewCache), attribute.CacheType);
        }