public void CanMatchOnParameterlessMethods()
        {
            List <string> parameterLess = new List <string>();
            MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(parameterLess);

            Assert.IsTrue(matchingRule.Matches(objectToStringMethod));
        }
        public void MatchIsDeniedWhenParamterValuesCountDiffers()
        {
            List<string> oneParam = new List<string>();
            oneParam.Add("one");

            MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(oneParam);
            Assert.IsFalse(matchingRule.Matches(objectToStringMethod));
        }
        public void MatchIsDeniedWhenParamterValuesCountDiffers()
        {
            List <string> oneParam = new List <string>();

            oneParam.Add("one");

            MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(oneParam);

            Assert.IsFalse(matchingRule.Matches(objectToStringMethod));
        }
        public void MatchIsDeniedWhenASingleParameterIsWrong()
        {
            List<string> parametersForCopyToMethod = new List<string>();
            parametersForCopyToMethod.Add("System.Int32");
            parametersForCopyToMethod.Add("System.Char[]");
            parametersForCopyToMethod.Add("System.NotAnInt32");
            parametersForCopyToMethod.Add("System.Int32");

            MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(parametersForCopyToMethod);
            Assert.IsFalse(matchingRule.Matches(stringCopyToMethod));
        }
        public void CanMatchOnMultipleParameterTypes()
        {
            List<string> parametersForCopyToMethod = new List<string>();
            parametersForCopyToMethod.Add("System.Int32");
            parametersForCopyToMethod.Add("System.Char[]");
            parametersForCopyToMethod.Add("System.Int32");
            parametersForCopyToMethod.Add("System.Int32");

            MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(parametersForCopyToMethod);
            Assert.IsTrue(matchingRule.Matches(stringCopyToMethod));
        }
        public void MatchIsDeniedWhenASingleParameterIsWrong()
        {
            List <string> parametersForCopyToMethod = new List <string>();

            parametersForCopyToMethod.Add("System.Int32");
            parametersForCopyToMethod.Add("System.Char[]");
            parametersForCopyToMethod.Add("System.NotAnInt32");
            parametersForCopyToMethod.Add("System.Int32");

            MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(parametersForCopyToMethod);

            Assert.IsFalse(matchingRule.Matches(stringCopyToMethod));
        }
        public void CanMatchOnMultipleParameterTypes()
        {
            List <string> parametersForCopyToMethod = new List <string>();

            parametersForCopyToMethod.Add("System.Int32");
            parametersForCopyToMethod.Add("System.Char[]");
            parametersForCopyToMethod.Add("System.Int32");
            parametersForCopyToMethod.Add("System.Int32");

            MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(parametersForCopyToMethod);

            Assert.IsTrue(matchingRule.Matches(stringCopyToMethod));
        }
 public void CanMatchOnParameterlessMethods()
 {
     List<string> parameterLess = new List<string>();
     MethodSignatureMatchingRule matchingRule = new MethodSignatureMatchingRule(parameterLess);
     Assert.IsTrue(matchingRule.Matches(objectToStringMethod));
 }