Last active
December 22, 2015 16:38
-
-
Save JamesBender/6500481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using NUnit.Framework; | |
namespace ThirtyDaysOfTDD.UnitTests | |
{ | |
[TestFixture] | |
public class StringUtilsTest | |
{ | |
[Test] | |
public void ShouldBeAbleToCountNumberOfLettersInSimpleSentence() | |
{ | |
var sentenceToScan = "TDD is awesome!"; | |
var characterToScanFor = "e"; | |
var expectedResult = 2; | |
var stringUtils = new StringUtils(); | |
int result = stringUtils.FindNumberOfOccurences(sentenceToScan, characterToScanFor); | |
Assert.AreEqual(expectedResult, result); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment