Exemplo n.º 1
0
        public void Wrong_Type_Throw_Exception_Test()
        {
            TestInputCollector collector = GetCollector();

            Assert.Throws(
                typeof(TypeIsNotInputSourceException),
                () => { collector.AddInputSource(typeof(TestInputCollector)); });
        }
Exemplo n.º 2
0
        public void Add_New_Input_By_Template_Source_Test()
        {
            TestInputCollector collector = GetCollector();

            collector.AddInputSource <AInputSource>();

            Assert.AreEqual(1, collector.Count);
            Assert.AreEqual(1, collector.transform.childCount);

            Assert.IsTrue(collector[0] is AInputSource);
        }
Exemplo n.º 3
0
        public void Remove_Input_Source_Test()
        {
            TestInputCollector collector = GetCollector();

            collector.AddInputSource <AInputSource>();

            Assert.AreEqual(1, collector.Count);
            Assert.AreEqual(1, collector.transform.childCount);

            collector.RemoveAt(0);

            Assert.AreEqual(0, collector.Count);
            Assert.AreEqual(0, collector.transform.childCount);
        }