예제 #1
0
        public static void TestUseCase2()
        {
            var a  = new Bridge634A <string>();
            var a1 = new Bridge634A <string> .Nested();

            var a2 = new Bridge634A <string> .Nested <int>();

            var a3 = new Bridge634A <string> .Nested.SubNested();

            var a4 = new Bridge634A <string> .Nested.SubNested <int>();

            var a5 = new Bridge634A <string> .Nested <int> .SubNested();

            var a6 = new Bridge634A <string> .Nested <int> .SubNested <int>();

            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634A`1[[System.String, mscorlib]]", a.GetType().FullName, "Bridge634 A a");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634A`1+Nested[[System.String, mscorlib]]", a1.GetType().FullName, "Bridge634 A a1");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634A`1+Nested`1[[System.String, mscorlib],[System.Int32, mscorlib]]", a2.GetType().FullName, "Bridge634 A a2");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634A`1+Nested+SubNested[[System.String, mscorlib]]", a3.GetType().FullName, "Bridge634 A a3");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634A`1+Nested+SubNested`1[[System.String, mscorlib],[System.Int32, mscorlib]]", a4.GetType().FullName, "Bridge634 A a4");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634A`1+Nested`1+SubNested[[System.String, mscorlib],[System.Int32, mscorlib]]", a5.GetType().FullName, "Bridge634 A a5");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634A`1+Nested`1+SubNested`1[[System.String, mscorlib],[System.Int32, mscorlib],[System.Int32, mscorlib]]", a6.GetType().FullName, "Bridge634 A a6");

            var b  = new Bridge634B <string>();
            var b1 = new Bridge634B <string> .Nested();

            var b2 = new Bridge634B <string> .Nested <int>();

            var b3 = new Bridge634B <string> .Nested.SubNested();

            var b4 = new Bridge634B <string> .Nested.SubNested <int>();

            var b5 = new Bridge634B <string> .Nested <int> .SubNested();

            var b6 = new Bridge634B <string> .Nested <int> .SubNested <int>();

            Assert.AreEqual("ClientTestLibraryCustom.Bridge634B`1[[System.String, mscorlib]]", b.GetType().FullName, "Bridge634 B b");
            Assert.AreEqual("ClientTestLibraryCustom.Bridge634B`1+Nested[[System.String, mscorlib]]", b1.GetType().FullName, "Bridge634 B b1");
            Assert.AreEqual("ClientTestLibraryCustom.Bridge634B`1+Nested`1[[System.String, mscorlib],[System.Int32, mscorlib]]", b2.GetType().FullName, "Bridge634 B b2");
            Assert.AreEqual("ClientTestLibraryCustom.Bridge634B`1+Nested+SubNested[[System.String, mscorlib]]", b3.GetType().FullName, "Bridge634 B b3");
            Assert.AreEqual("ClientTestLibraryCustom.Bridge634B`1+Nested+SubNested`1[[System.String, mscorlib],[System.Int32, mscorlib]]", b4.GetType().FullName, "Bridge634 B b4");
            Assert.AreEqual("ClientTestLibraryCustom.Bridge634B`1+Nested`1+SubNested[[System.String, mscorlib],[System.Int32, mscorlib]]", b5.GetType().FullName, "Bridge634 B b5");
            Assert.AreEqual("ClientTestLibraryCustom.Bridge634B`1+Nested`1+SubNested`1[[System.String, mscorlib],[System.Int32, mscorlib],[System.Int32, mscorlib]]", b6.GetType().FullName, "Bridge634 B b6");

            var c  = new Bridge634C();
            var c1 = new Bridge634C.Nested();
            var c2 = new Bridge634C.Nested <int>();
            var c3 = new Bridge634C.Nested.SubNested();
            var c4 = new Bridge634C.Nested.SubNested <int>();
            var c5 = new Bridge634C.Nested <int> .SubNested();

            var c6 = new Bridge634C.Nested <int> .SubNested <int>();

            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634C", c.GetType().FullName, "Bridge634 C c");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634C+Nested", c1.GetType().FullName, "Bridge634 C c1");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634C+Nested`1[[System.Int32, mscorlib]]", c2.GetType().FullName, "Bridge634 C c2");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634C+Nested+SubNested", c3.GetType().FullName, "Bridge634 C c3");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634C+Nested+SubNested`1[[System.Int32, mscorlib]]", c4.GetType().FullName, "Bridge634 C c4");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634C+Nested`1+SubNested[[System.Int32, mscorlib]]", c5.GetType().FullName, "Bridge634 C c5");
            Assert.AreEqual("Bridge.ClientTest.Batch3.BridgeIssues.Bridge634C+Nested`1+SubNested`1[[System.Int32, mscorlib],[System.Int32, mscorlib]]", c6.GetType().FullName, "Bridge634 C c6");
        }
예제 #2
0
        public static void TestUseCase2()
        {
            var a  = new Bridge634A <string>();
            var a1 = new Bridge634A <string> .Nested();

            var a2 = new Bridge634A <string> .Nested <int>();

            var a3 = new Bridge634A <string> .Nested.SubNested();

            var a4 = new Bridge634A <string> .Nested.SubNested <int>();

            var a5 = new Bridge634A <string> .Nested <int> .SubNested();

            var a6 = new Bridge634A <string> .Nested <int> .SubNested <int>();

            Assert.AreEqual(a.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634A$1$String", "Bridge634 A a");
            Assert.AreEqual(a1.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634A$1.Nested$String", "Bridge634 A a1");
            Assert.AreEqual(a2.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634A$1.Nested$1$String$Bridge.Int", "Bridge634 A a2");
            Assert.AreEqual(a3.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634A$1.Nested.SubNested$String", "Bridge634 A a3");
            Assert.AreEqual(a4.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634A$1.Nested.SubNested$1$String$Bridge.Int", "Bridge634 A a4");
            Assert.AreEqual(a5.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634A$1.Nested$1.SubNested$String$Bridge.Int", "Bridge634 A a5");
            Assert.AreEqual(a6.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634A$1.Nested$1.SubNested$1$String$Bridge.Int$Bridge.Int", "Bridge634 A a6");

            var b  = new Bridge634B <string>();
            var b1 = new Bridge634B <string> .Nested();

            var b2 = new Bridge634B <string> .Nested <int>();

            var b3 = new Bridge634B <string> .Nested.SubNested();

            var b4 = new Bridge634B <string> .Nested.SubNested <int>();

            var b5 = new Bridge634B <string> .Nested <int> .SubNested();

            var b6 = new Bridge634B <string> .Nested <int> .SubNested <int>();

            Assert.AreEqual(b.GetClassName(), "ClientTestLibraryCustom.Bridge634B$1$String", "Bridge634 B b");
            Assert.AreEqual(b1.GetClassName(), "ClientTestLibraryCustom.Bridge634B$1.Nested$String", "Bridge634 B b1");
            Assert.AreEqual(b2.GetClassName(), "ClientTestLibraryCustom.Bridge634B$1.Nested$1$String$Bridge.Int", "Bridge634 B b2");
            Assert.AreEqual(b3.GetClassName(), "ClientTestLibraryCustom.Bridge634B$1.Nested.SubNested$String", "Bridge634 B b3");
            Assert.AreEqual(b4.GetClassName(), "ClientTestLibraryCustom.Bridge634B$1.Nested.SubNested$1$String$Bridge.Int", "Bridge634 B b4");
            Assert.AreEqual(b5.GetClassName(), "ClientTestLibraryCustom.Bridge634B$1.Nested$1.SubNested$String$Bridge.Int", "Bridge634 B b5");
            Assert.AreEqual(b6.GetClassName(), "ClientTestLibraryCustom.Bridge634B$1.Nested$1.SubNested$1$String$Bridge.Int$Bridge.Int", "Bridge634 B b6");

            var c  = new Bridge634C();
            var c1 = new Bridge634C.Nested();
            var c2 = new Bridge634C.Nested <int>();
            var c3 = new Bridge634C.Nested.SubNested();
            var c4 = new Bridge634C.Nested.SubNested <int>();
            var c5 = new Bridge634C.Nested <int> .SubNested();

            var c6 = new Bridge634C.Nested <int> .SubNested <int>();

            Assert.AreEqual(c.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634C", "Bridge634 C c");
            Assert.AreEqual(c1.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634C.Nested", "Bridge634 C c1");
            Assert.AreEqual(c2.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634C.Nested$1$Bridge.Int", "Bridge634 C c2");
            Assert.AreEqual(c3.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634C.Nested.SubNested", "Bridge634 C c3");
            Assert.AreEqual(c4.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634C.Nested.SubNested$1$Bridge.Int", "Bridge634 C c4");
            Assert.AreEqual(c5.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634C.Nested$1.SubNested$Bridge.Int", "Bridge634 C c5");
            Assert.AreEqual(c6.GetClassName(), "Bridge.ClientTest.BridgeIssues.Bridge634C.Nested$1.SubNested$1$Bridge.Int$Bridge.Int", "Bridge634 C c6");
        }