Exemplo n.º 1
0
        public DiscJockey(IConfigSettings configSettings, IAudioPlayer audioPlayer, SpeechMaker speechMaker)
        {
            _audioPlayer      = audioPlayer;
            _speechMaker      = speechMaker;
            _brokenBuildSound = configSettings.BrokenBuildSound;
            _fixedBuildSound  = configSettings.FixedBuildSound;

            configSettings.AddObserver(this);
        }
Exemplo n.º 2
0
        public DiscJockey(IConfigSettings configSettings, IAudioPlayer audioPlayer, SpeechMaker speechMaker)
        {
            _audioPlayer = audioPlayer;
            _speechMaker = speechMaker;
            _brokenBuildSound = configSettings.BrokenBuildSound;
            _fixedBuildSound = configSettings.FixedBuildSound;

            configSettings.AddObserver(this);
        }
Exemplo n.º 3
0
        public void SetUp()
        {
            MockRepository.GenerateStub<IBuildBuster>();
            _speechTextParser = MockRepository.GenerateMock<ISpeechTextParser>();

            _projectStatusList = new List<ProjectStatus>
                                 {
                                 	new ProjectStatus("Project2")
                                 	{
                                 		LastBuildStatus = ProjectStatus.SUCCESS
                                 	}
                                 };

            _speaker = new SpeechMaker(new ConfigSettings
                                       {
                                            FixedBuildText = ProjectFixedText,
                                       		BrokenBuildText = ProjectBrokenText
                                       }, _speechTextParser);
        }
Exemplo n.º 4
0
        public void SetUp()
        {
            _audioPlayer = MockRepository.GenerateMock<IAudioPlayer>();
            _buildBuster = MockRepository.GenerateMock<IBuildBuster>();

            _configSettings = new ConfigSettings
            {
                BrokenBuildSound = BrokenSound,
                FixedBuildSound = FixedSound,
                PlaySounds = true
            };

            _speechMaker = new SpeechMaker(_configSettings, new SpeechTextParser(_buildBuster));

            _discJockey = new DiscJockey(_configSettings, _audioPlayer, _speechMaker);
            _projectList1Success = new List<ProjectStatus> { new ProjectStatus("bla")
                                                             {
                                                             	LastBuildStatus = ProjectStatus.SUCCESS
                                                             } };
            _projectList1Failure = new List<ProjectStatus> { new ProjectStatus("bla")
                                                             {
                                                             	LastBuildStatus = ProjectStatus.FAILURE
                                                             } };

            _projectList2BothSuccess = new List<ProjectStatus>
            {
                new ProjectStatus("bla") {LastBuildStatus = ProjectStatus.SUCCESS},
                new ProjectStatus("bla2") {LastBuildStatus = ProjectStatus.SUCCESS}
            };

            _projectList2BothFailure = new List<ProjectStatus>
            {
                new ProjectStatus("bla") {LastBuildStatus = ProjectStatus.FAILURE},
                new ProjectStatus("bla2") {LastBuildStatus = ProjectStatus.FAILURE}
            };
        }