Ejemplo n.º 1
0
        private static void TestMatch()
        {
            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo1 = new C1();

            RunTest("Match1", () => oo1.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo5 = new C5();

            RunTest("Match5", () => oo5.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo9 = new C9();

            RunTest("Match9", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo11 = new C11();

            RunTest("Match11", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo15 = new C15();

            RunTest("Match15", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo19 = new C19();

            RunTest("Match19", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));
        }
Ejemplo n.º 2
0
        public static void TestMatch()
        {
            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo1 = new C1();

            RunTest("Match1", () => oo1.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo5 = new C5();

            RunTest("Match5", () => oo5.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo9 = new C9();

            RunTest("Match9", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo11 = new C11();

            RunTest("Match11", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo15 = new C15();

            RunTest("Match15", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo19 = new C19();

            RunTest("Match19", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));
        }