System.Tests.AttributeGetCustomAttributes.RunPosTests C# (CSharp) Method

RunPosTests() private method

private RunPosTests ( ) : void
return void
        public static void RunPosTests()
        {
            Type clsType2 = typeof(TestClass2);
            Type clsType3 = typeof(TestClass3);
            Assembly assem = clsType2.Assembly;

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem), new int[] { 0 }, "00A"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2")), new int[] { 14, 4 }, "00B"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2").GetParameters()[0]), new int[] { 16 }, "00C"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetEvent("TestEvent2")), new int[] { 15 }, "00D"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetProperty("TestProperty2")), new int[] { 13 }, "00E"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetField("TestField2")), new int[] { 12 }, "00F"));

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem, false), new int[] { 0 }, "00A1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2"), false), new int[] { 14, 4 }, "00B1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2").GetParameters()[0], false), new int[] { 16 }, "00C1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetEvent("TestEvent2"), false), new int[] { 15 }, "00D1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetProperty("TestProperty2"), false), new int[] { 13 }, "00E1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetField("TestField2"), false), new int[] { 12 }, "00F1"));

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem, typeof(TestAttribute)), new int[] { 0 }, "00A2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2"), typeof(TestAttribute)), new int[] { 14, 4 }, "00B2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2").GetParameters()[0], typeof(TestAttribute)), new int[] { 16 }, "00C2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetEvent("TestEvent2"), typeof(TestAttribute)), new int[] { 15 }, "00D2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetProperty("TestProperty2"), typeof(TestAttribute)), new int[] { 13 }, "00E2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetField("TestField2"), typeof(TestAttribute)), new int[] { 12 }, "00F2"));

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem, typeof(TestAttribute), false), new int[] { 0 }, "00A3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2"), typeof(TestAttribute), false), new int[] { 14, 4 }, "00B3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetMethod("TestMethod2").GetParameters()[0], typeof(TestAttribute), false), new int[] { 16 }, "00C3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetEvent("TestEvent2"), typeof(TestAttribute), false), new int[] { 15 }, "00D3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetProperty("TestProperty2"), typeof(TestAttribute), false), new int[] { 13 }, "00E3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType2.GetField("TestField2"), typeof(TestAttribute), false), new int[] { 12 }, "00F3"));

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem), new int[] { 0 }, "00A"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3")), new int[0], "00B"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3").GetParameters()[0]), new int[0], "00C"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetEvent("TestEvent3")), new int[0], "00D"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetProperty("TestProperty3")), new int[0], "00E"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetField("TestField3")), new int[0], "00F"));

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem, false), new int[] { 0 }, "00A1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3"), false), new int[0], "00B1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3").GetParameters()[0], false), new int[0], "00C1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetEvent("TestEvent3"), false), new int[0], "00D1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetProperty("TestProperty3"), false), new int[0], "00E1"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetField("TestField3"), false), new int[0], "00F1"));

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem, typeof(TestAttribute)), new int[] { 0 }, "00A2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3"), typeof(TestAttribute)), new int[0], "00B2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3").GetParameters()[0], typeof(TestAttribute)), new int[0], "00C2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetEvent("TestEvent3"), typeof(TestAttribute)), new int[0], "00D2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetProperty("TestProperty3"), typeof(TestAttribute)), new int[0], "00E2"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetField("TestField3"), typeof(TestAttribute)), new int[0], "00F2"));

            Assert.True(PositiveTest(Attribute.GetCustomAttributes(assem, typeof(TestAttribute), false), new int[] { 0 }, "00A3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3"), typeof(TestAttribute), false), new int[0], "00B3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetMethod("TestMethod3").GetParameters()[0], typeof(TestAttribute), false), new int[0], "00C3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetEvent("TestEvent3"), typeof(TestAttribute), false), new int[0], "00D3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetProperty("TestProperty3"), typeof(TestAttribute), false), new int[0], "00E3"));
            Assert.True(PositiveTest(Attribute.GetCustomAttributes(clsType3.GetField("TestField3"), typeof(TestAttribute), false), new int[0], "00F3"));
        }
AttributeGetCustomAttributes