private static void TestNullPickingCorrectMethods() { var theClass = new ClassWithAmbigousMethods(); theClass.NullPicking1(null); Assert("NullPicking1_InterfaceB", Output); }
private static void TestAmbiguousMethodWithInterfaceAndTwoArgs() { var theClass = new ClassWithAmbigousMethods(); theClass.TwoArgsWithInterface(new ClassB1(), new ClassB2()); Assert("OneArgWithInterface_InterfaceBClassB2", Output); }
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); }
private static void TestAmbiguousMethodWith1ArgAndClass() { var theClass = new ClassWithAmbigousMethods(); theClass.OneArgWithClass(0); Assert("OneArgWithClass_Int", Output); ResetOutput(); theClass.OneArgWithClass(new ClassA()); Assert("OneArgWithClass_ClassA", Output); }
private static void TestAmbiguousMethodWith1ArgAndObject() { var theClass = new ClassWithAmbigousMethods(); theClass.OneArgWithObj(0); Assert("OneArgWithObj_Int", Output); ResetOutput(); theClass.OneArgWithObj("Test"); Assert("OneArgWithObj_Object", Output); }
private static void TestAmbiguousMethodWith1Arg() { var theClass = new ClassWithAmbigousMethods(); theClass.OneArg(0); Assert("OneArg_Int", Output); ResetOutput(); theClass.OneArg("Test"); Assert("OneArg_String", Output); }
private static void TestNumberMethod() { var theClass = new ClassWithAmbigousMethods(); theClass.GenericPickingNumber(4); Assert("GenericPickingNumber_double", Output); ResetOutput(); theClass.GenericPickingNumber(4.5); Assert("GenericPickingNumber_double", Output); }
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); }