コード例 #1
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
                }
            };
        }
コード例 #2
0
        public void SetUp()
        {
            Create.Stub <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);
        }