public void TestConfigurationManagerConstructorIOInterfaceComponentsTag() { ConfigurationManager manager = new ConfigurationManager(@"MockConfigurationComponentsTag.xml"); IEnumerable <IParseable> foundComponents = manager.Components; Assert.AreEqual(5, foundComponents.Count()); Assert.AreEqual(2, foundComponents.OfType <IIOInterface>().Count()); Assert.AreEqual(1, foundComponents.OfType <IIOInterface>().Count(c => c.Children.Any())); IIOInterface ioInterface = foundComponents.OfType <IIOInterface>().Single(c => c.Children.Any()); Assert.AreEqual(1, ioInterface.Children.Count()); manager.Dispose(); }
public void TestConfigurationManagerConstructorIOInterfaceNestedComponentsTag() { ConfigurationManager manager = new ConfigurationManager(@"MockConfigurationNestedComponentsTag.xml"); IEnumerable <IParseable> foundComponents = manager.Components; Assert.AreEqual(5, foundComponents.Count()); Assert.AreEqual(2, foundComponents.OfType <IIOInterface>().Count()); Assert.AreEqual(1, foundComponents.OfType <IIOInterface>().Count(c => c.Children.Any())); IIOInterface ioInterface = foundComponents.OfType <IIOInterface>().Single(c => c.Children.Any()); Assert.AreEqual(1, ioInterface.Children.Count()); MockSupport support = ioInterface.Children.First() as MockSupport; Assert.IsNotNull(support); Assert.AreEqual(1, support.Children.Count()); Assert.AreEqual(1, support.Children.OfType <MockSupport>().Count()); manager.Dispose(); }
public void AddInterface(IIOInterface inter) { interfaces.Add(inter); }
public Engine(IGameDatabase gameDatabase, IIOInterface io) { this.gameDatabase = gameDatabase; this.io = io; }