This file contains hidden or 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
| <appSettings> | |
| <add key="ServerDrop.MaxRequestTimeInSeconds" value="300"/> | |
| </appSettings> |
This file contains hidden or 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
| private StringUtils _stringUtils; | |
| [TestFixtureSetUp] | |
| public void SetupStringUtilTests() | |
| { | |
| _stringUtils = new StringUtils(); | |
| } |
This file contains hidden or 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 | |
| { | |
| private StringUtils _stringUtils; |
This file contains hidden or 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
| private StringUtils _stringUtils; | |
| [SetUp] | |
| public void SetupStringUtilTests() | |
| { | |
| _stringUtils = new StringUtils(); | |
| } |
This file contains hidden or 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] |
This file contains hidden or 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; | |
| namespace ThirtyDaysOfTDD.UnitTests | |
| { | |
| public class StringUtils | |
| { | |
| public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor) | |
| { | |
| if (characterToScanFor.Length != 1) | |
| { |
This file contains hidden or 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; | |
| namespace ThirtyDaysOfTDD.UnitTests | |
| { | |
| public class StringUtils | |
| { | |
| public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor) | |
| { | |
| try | |
| { |
This file contains hidden or 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; | |
| namespace ThirtyDaysOfTDD.UnitTests | |
| { | |
| public class StringUtils | |
| { | |
| public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor) | |
| { | |
| try | |
| { |
This file contains hidden or 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; | |
| namespace ThirtyDaysOfTDD.UnitTests | |
| { | |
| public class StringUtils | |
| { | |
| public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor) | |
| { | |
| throw new ArgumentException(); |
This file contains hidden or 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
| [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); | |
| } |