public void Process_to_PluginGraph() { var graph = new PluginGraph(); var scanner = new DefaultConventionScanner(); var registry = new Registry(); scanner.Process(typeof (Convention), registry); registry.ShouldBeOfType<IPluginGraphConfiguration>().Configure(graph); Assert.IsFalse(graph.Families.Has(typeof (IServer))); Assert.IsTrue(graph.Families.Has(typeof (IConvention))); var family = graph.Families[typeof (IConvention)]; Assert.AreEqual(1, family.Instances.Count()); }
public void Process_to_PluginGraph() { var graph = new PluginGraph(); var scanner = new DefaultConventionScanner(); var registry = new Registry(); scanner.Process(typeof (Convention), registry); registry.ConfigureWithoutScanning(graph); Assert.IsFalse(graph.ContainsFamily(typeof (IServer))); Assert.IsTrue(graph.ContainsFamily(typeof(IConvention))); PluginFamily family = graph.FindFamily(typeof (IConvention)); family.Seal(); Assert.AreEqual(1, family.InstanceCount); }
public void Process_to_PluginGraph() { var graph = new PluginGraph(); var scanner = new DefaultConventionScanner(); var registry = new Registry(); scanner.Process(typeof (Convention), registry); registry.As<IPluginGraphConfiguration>().Configure(graph); graph.Families.Has(typeof (IServer)).ShouldBeFalse(); graph.Families.Has(typeof (IConvention)).ShouldBeTrue(); var family = graph.Families[typeof (IConvention)]; family.Instances.Count().ShouldBe(1); }