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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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 BuildBusterImageDecorator([InjectBuildBuster] IBuildBuster buildBuster, IAppLocation appLocation)
 {
     _buildBuster = buildBuster;
     _imageFolder = Path.Combine(appLocation.DirectoryName, "images");
 }
Ejemplo n.º 7
0
 public void SetUp()
 {
     _speechSynth = MockRepository.GenerateMock<ISpeechSynthesizer>();
     _appLocation = MockRepository.GenerateMock<IAppLocation>();
     _appLocation.Stub(a => a.DirectoryName).Return(@"c:\bla");
 }
Ejemplo n.º 8
0
 public void SetUp()
 {
     _speechSynth = Create.Mock <ISpeechSynthesizer>();
     _appLocation = Create.Stub <IAppLocation>();
     _appLocation.Stub(a => a.DirectoryName).Return(@"c:\bla");
 }
Ejemplo n.º 9
0
 public void SetUp()
 {
     _speechSynth = Create.Mock<ISpeechSynthesizer>();
     _appLocation = Create.Stub<IAppLocation>();
     _appLocation.Stub(a => a.DirectoryName).Return(@"c:\bla");
 }