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); }
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); }
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); }
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); }