Ejemplo n.º 1
0
            public void ImplicitLoadAllReferencedAssemblies_does_not_check_assembly_for_views_if_assembly_filtered()
            {
                var mockCache            = new Mock <IViewAssemblyCache>();
                var objectItemCollection = new ObjectItemCollection(mockCache.Object);

                objectItemCollection.ImplicitLoadAllReferencedAssemblies(
                    typeof(object).Assembly, new EdmItemCollection(Enumerable.Empty <XmlReader>()));

                mockCache.Verify(m => m.CheckAssembly(It.IsAny <Assembly>(), It.IsAny <bool>()), Times.Never());
            }
Ejemplo n.º 2
0
            public void ImplicitLoadAllReferencedAssemblies_checks_assembly_and_references_for_views_if_assembly_not_filtered()
            {
                var mockCache            = new Mock <IViewAssemblyCache>();
                var objectItemCollection = new ObjectItemCollection(mockCache.Object);

                objectItemCollection.ImplicitLoadAllReferencedAssemblies(
                    typeof(FactAttribute).Assembly, new EdmItemCollection(Enumerable.Empty <XmlReader>()));

                mockCache.Verify(m => m.CheckAssembly(typeof(FactAttribute).Assembly, true), Times.Once());
            }
Ejemplo n.º 3
0
            public void ImplicitLoadAllReferencedAssemblies_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.ImplicitLoadAllReferencedAssemblies(
                    typeof(FactAttribute).Assembly, new EdmItemCollection(Enumerable.Empty <XmlReader>()));

                KnownAssemblyEntry _;

                mockKnownAssemblies.Verify(
                    m => m.TryGetKnownAssembly(typeof(FactAttribute).Assembly, It.IsAny <object>(), It.IsAny <EdmItemCollection>(), out _));
            }