public void ExplicitLoadFromAssembly_checks_only_given_assembly_for_views() { var mockCache = new Mock <IViewAssemblyCache>(); var objectItemCollection = new ObjectItemCollection(mockCache.Object); objectItemCollection.ExplicitLoadFromAssembly( typeof(object).Assembly, new EdmItemCollection(Enumerable.Empty <XmlReader>()), null); mockCache.Verify(m => m.CheckAssembly(typeof(object).Assembly, false), Times.Once()); }
public void ExplicitLoadFromAssembly_does_perform_o_space_lookup_if_o_space_types_not_already_loaded() { var mockKnownAssemblies = new Mock <KnownAssembliesSet>(); var objectItemCollection = new ObjectItemCollection(new Mock <IViewAssemblyCache>().Object, mockKnownAssemblies.Object); objectItemCollection.ExplicitLoadFromAssembly( typeof(FactAttribute).Assembly, new EdmItemCollection(Enumerable.Empty <XmlReader>()), null); KnownAssemblyEntry _; mockKnownAssemblies.Verify( m => m.TryGetKnownAssembly(typeof(FactAttribute).Assembly, It.IsAny <object>(), It.IsAny <EdmItemCollection>(), out _)); }