public void GetParametersIndexForMethod_Should_ReturnNull_Given_NoMethodFullNameAndTheArraysOfChosenMethodsAndChosenMethodsParametersIndexes() { MethodsManagementUtilities methodsManagementUtilities = new MethodsManagementUtilities(); string[] chosenMethods = new string[0]; string[] chosenMethodsParametersIndexes = new string[0]; string methodFullName = string.Empty; string parametersIndex = methodsManagementUtilities.GetParametersIndexForMethod(methodFullName, chosenMethods, chosenMethodsParametersIndexes); Assert.IsNull(parametersIndex, "The method GetParametersIndexForMethod doesn't return the expected parametersIndex"); }
public void GetParametersIndexForMethod_Should_ReturnTheExpectedParameterIndex_Given_TheMethodFullNameAndTheArraysOfChosenMethodsAndChosenMethodsParametersIndexes() { MethodsManagementUtilities methodsManagementUtilities = new MethodsManagementUtilities(); int expectedIndex = 1; string[] chosenMethods = new string[4] { "FirstMethod", "SecondMethod", "ThirdMethod", "FourthMethod" }; string[] chosenMethodsParametersIndexes = new string[4] { "FirstIndex", "SecondIndex", "ThirdIndex", "FourthIndex" }; string methodFullName = chosenMethods[expectedIndex]; string parametersIndex = methodsManagementUtilities.GetParametersIndexForMethod(methodFullName, chosenMethods, chosenMethodsParametersIndexes); Assert.AreEqual(chosenMethodsParametersIndexes[expectedIndex], parametersIndex, "The method GetParametersIndexForMethod doesn't return the expected parametersIndex"); }