Skip to content

Instantly share code, notes, and snippets.

@Hameds
Created November 2, 2017 09:07
Show Gist options
  • Select an option

  • Save Hameds/c3237ff09ce552f26d0ea03b8d2f543f to your computer and use it in GitHub Desktop.

Select an option

Save Hameds/c3237ff09ce552f26d0ea03b8d2f543f to your computer and use it in GitHub Desktop.
[Test]
[ExpectedException(typeof(ArgumentException))]
public void ShouldGetAnArgumentExceptionWhenCharacterToScanForIsLargerThanOneCharacter()
{
var sentenceToScan = "This test should throw an exception";
var characterToScanFor = "xx";
var stringUtils = new StringUtils();
stringUtils.FindNumberOfOccurences(sentenceToScan, characterToScanFor);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment