Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public void AddInterface(IIOInterface inter)
 {
     interfaces.Add(inter);
 }
Ejemplo n.º 4
0
 public Engine(IGameDatabase gameDatabase, IIOInterface io)
 {
     this.gameDatabase = gameDatabase;
     this.io           = io;
 }