public void SetUp() { _buildBuster = MockRepository.GenerateStub<IBuildBuster>(); _appLocation = MockRepository.GenerateStub<IAppLocation>(); // it is very important that we don't rely on (and therefore retest) the 'decorated' BuildBuster object // If we did, then that class failing would fail this test too (a classic case of fickle (and therefore bad) tests _appLocation.Stub(a => a.DirectoryName).Return(DirectoryName); _buildBusterDecorator = new BuildBusterImageDecorator(_buildBuster, _appLocation); }
public void SetUp() { _buildBuster = MockRepository.GenerateStub <IBuildBuster>(); _appLocation = MockRepository.GenerateStub <IAppLocation>(); // it is very important that we don't rely on (and therefore retest) the 'decorated' BuildBuster object // If we did, then that class failing would fail this test too (a classic case of fickle (and therefore bad) tests _appLocation.Stub(a => a.DirectoryName).Return(DirectoryName); _buildBusterDecorator = new BuildBusterImageDecorator(_buildBuster, _appLocation); }
public AudioPlayer(ISpeechSynthesizer speechSynth, IConfigSettings configSettings, VoiceSelector voiceSelector, IAppLocation appLocation) { _voiceSelector = voiceSelector; _speechVoiceName = configSettings.SpeechVoiceName; _playSounds = configSettings.PlaySounds; _playSpeech = configSettings.PlaySpeech; _wavFileFolder = Path.Combine(appLocation.DirectoryName, "sounds"); _speechSynth = speechSynth; _speechSynth.Rate = -2; //TODO might be useful as configuration configSettings.AddObserver(this); }
public BuildBusterImageDecorator([InjectBuildBuster] IBuildBuster buildBuster, IAppLocation appLocation) { _buildBuster = buildBuster; _imageFolder = Path.Combine(appLocation.DirectoryName, "images"); }
public void SetUp() { _speechSynth = MockRepository.GenerateMock<ISpeechSynthesizer>(); _appLocation = MockRepository.GenerateMock<IAppLocation>(); _appLocation.Stub(a => a.DirectoryName).Return(@"c:\bla"); }
public void SetUp() { _speechSynth = Create.Mock <ISpeechSynthesizer>(); _appLocation = Create.Stub <IAppLocation>(); _appLocation.Stub(a => a.DirectoryName).Return(@"c:\bla"); }
public void SetUp() { _speechSynth = Create.Mock<ISpeechSynthesizer>(); _appLocation = Create.Stub<IAppLocation>(); _appLocation.Stub(a => a.DirectoryName).Return(@"c:\bla"); }