コード例 #1
0
        public void TypeDisintegratorPointerTest()
        {
            Type type = Type.GetType("System.Void*");
            TypeDisintegrator typeDisintegrator = new TypeDisintegrator(type);

            NUnit.Framework.Assert.AreEqual(0, typeDisintegrator.Types.Length);
        }
コード例 #2
0
        public void TypeDisintegratorClassTest()
        {
            TypeDisintegrator typeDisintegrator = new TypeDisintegrator(typeof(EventData1));

            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(EventData1)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(EventData2)));
        }
コード例 #3
0
        public void TypeDisintegratorNestTest()
        {
            TypeDisintegrator typeDisintegrator = new TypeDisintegrator(typeof(Data1));

            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(Data1)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(Data2)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(Data1[])));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(Data2[])));
        }
コード例 #4
0
        public void TypeDisintegratorInterfaceTest()
        {
            TypeDisintegrator typeDisintegrator = new TypeDisintegrator(typeof(ITest));

            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(Guid)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(string)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(float)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(byte)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(int)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(EventData1)));
            NUnit.Framework.Assert.IsTrue(typeDisintegrator.Types.Any(t => t == typeof(EventData2)));
        }
コード例 #5
0
        public void TypeDisintegratorIntTest()
        {
            TypeDisintegrator typeDisintegrator = new TypeDisintegrator(typeof(int));

            NUnit.Framework.Assert.AreEqual(typeof(int), typeDisintegrator.Types[0]);
        }