Esempio n. 1
0
        private static void TestNullPickingCorrectMethods()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.NullPicking1(null);
            Assert("NullPicking1_InterfaceB", Output);
        }
Esempio n. 2
0
        private static void TestAmbiguousMethodWithInterfaceAndTwoArgs()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.TwoArgsWithInterface(new ClassB1(), new ClassB2());
            Assert("OneArgWithInterface_InterfaceBClassB2", Output);
        }
Esempio n. 3
0
        private static void TestAmbiguousMethodWithInterface()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.OneArgWithInterface(new ClassB1());
            Assert("OneArgWithInterface_InterfaceB", Output);

            ResetOutput();
            theClass.OneArgWithInterface(new ClassB2());
            Assert("OneArgWithInterface_ClassB2", Output);
        }
Esempio n. 4
0
        private static void TestAmbiguousMethodWith1ArgAndClass()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.OneArgWithClass(0);
            Assert("OneArgWithClass_Int", Output);

            ResetOutput();
            theClass.OneArgWithClass(new ClassA());
            Assert("OneArgWithClass_ClassA", Output);
        }
Esempio n. 5
0
        private static void TestAmbiguousMethodWith1ArgAndObject()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.OneArgWithObj(0);
            Assert("OneArgWithObj_Int", Output);

            ResetOutput();
            theClass.OneArgWithObj("Test");
            Assert("OneArgWithObj_Object", Output);
        }
Esempio n. 6
0
        private static void TestAmbiguousMethodWith1Arg()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.OneArg(0);
            Assert("OneArg_Int", Output);

            ResetOutput();
            theClass.OneArg("Test");
            Assert("OneArg_String", Output);
        }
Esempio n. 7
0
        private static void TestNumberMethod()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.GenericPickingNumber(4);
            Assert("GenericPickingNumber_double", Output);

            ResetOutput();
            theClass.GenericPickingNumber(4.5);
            Assert("GenericPickingNumber_double", Output);
        }
Esempio n. 8
0
        private static void TestAmbigousMethodsWithGenerics()
        {
            var theClass = new ClassWithAmbigousMethods();

            theClass.GenericPicking(new ClassWithGenerics <bool>());
            Assert("GenericPicking_bool", Output);

            ResetOutput();
            theClass.GenericPicking(new ClassWithGenerics <int>());
            Assert("GenericPicking_int", Output);
        }