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)); }