public void MatchIsDeniedWhenReturnTypeNameDiffers()
 {
     IMatchingRule matchingRule = new ReturnTypeMatchingRule("System.wichReturnType?");
     Assert.IsFalse(matchingRule.Matches(objectToStringMethod));
 }
 public void MatchIsAcceptedWhenReturnTypeNameIsExactMatch()
 {
     IMatchingRule matchingRule = new ReturnTypeMatchingRule("System.String");
     Assert.IsTrue(matchingRule.Matches(objectToStringMethod));
 }
 public void MatchIsDeniedWhenReturnTypeIsSpecifiedButNoReturnTypeExistsOnMethodBase()
 {
     IMatchingRule matchingRule = new ReturnTypeMatchingRule("void");
     Assert.IsFalse(matchingRule.Matches(objectCtor));
 }
 public void MatchIsAcceptedForTypeNameWithoutNamespace()
 {
     IMatchingRule matchingRule = new ReturnTypeMatchingRule("string", true);
     Assert.IsTrue(matchingRule.Matches(objectToStringMethod));
 }
 public void MatchIsAcceptedWhenReturnTypeIsVoidAndMethodReturnsVoid()
 {
     IMatchingRule matchingRule = new ReturnTypeMatchingRule("System.Void");
     Assert.IsTrue(matchingRule.Matches(stringCopyToMethod));
 }
Exemplo n.º 6
0
        public void MatchIsDeniedWhenReturnTypeNameDiffers()
        {
            IMatchingRule matchingRule = new ReturnTypeMatchingRule("System.wichReturnType?");

            Assert.IsFalse(matchingRule.Matches(objectToStringMethod));
        }
        public void MatchIsAcceptedForTypeNameWithoutNamespace()
        {
            IMatchingRule matchingRule = new ReturnTypeMatchingRule("string", true);

            Assert.IsTrue(matchingRule.Matches(objectToStringMethod));
        }
        public void MatchIsAcceptedWhenReturnTypeIsVoidAndMethodReturnsVoid()
        {
            IMatchingRule matchingRule = new ReturnTypeMatchingRule("System.Void");

            Assert.IsTrue(matchingRule.Matches(stringCopyToMethod));
        }
        public void MatchIsDeniedWhenReturnTypeIsSpecifiedButNoReturnTypeExistsOnMethodBase()
        {
            IMatchingRule matchingRule = new ReturnTypeMatchingRule("void");

            Assert.IsFalse(matchingRule.Matches(objectCtor));
        }
        public void MatchIsAcceptedWhenReturnTypeNameIsExactMatch()
        {
            IMatchingRule matchingRule = new ReturnTypeMatchingRule("System.String");

            Assert.IsTrue(matchingRule.Matches(objectToStringMethod));
        }