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; | |
namespace ThirtyDaysOfTDD.UnitTests | |
{ | |
public class StringUtils | |
{ | |
public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor) | |
{ | |
return 2; | |
} |
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] |
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; | |
namespace ThirtyDaysOfTDD.UnitTests | |
{ | |
public class StringUtils | |
{ | |
public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor) | |
{ | |
var stringToCheckAsCharacterArray = sentenceToScan.ToCharArray(); | |
var characterToCheckFor = Char.Parse(characterToScanFor); |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace StaticallyBoundLibrary | |
{ | |
public class BusinessService | |
{ |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace StaticallyBoundLibrary | |
{ | |
public class BusinessService | |
{ |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace StaticallyBoundLibrary | |
{ | |
public class BusinessServiceFactory | |
{ |
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
public class DomainModule : NinjectModule | |
{ | |
public override void Load() | |
{ | |
Bind<IDataStoreProvider>().To<DataStoreProvider>(); | |
Bind<ILoggingProvider>().To<LoggingProvider>(); | |
Bind<IWebServiceProvider>().To<WebServiceProvider>(); | |
} | |
} |
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
public class BusinessServiceConsumer | |
{ | |
private BusinessService _businessService; | |
public BusinessServiceConsumer() | |
{ | |
var kernel = new StandardKernel(new DomainModule()); | |
_businessService = kernel.Get<BusinessService>(); | |
} |
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] |
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; | |
namespace ThirtyDaysOfTDD.UnitTests | |
{ | |
public class StringUtils | |
{ | |
public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor) | |
{ | |
var stringToCheckAsCharacterArray = sentenceToScan.ToCharArray(); | |
var characterToCheckFor = Char.Parse(characterToScanFor); |