Exemple #1
0
        public void When_About_is_called_GetBand_on_IBandProcess_is_called_with_the_correct_parameter_and_the_result_is_mapped_with_BandMapper()
        {
            var entity = BandCreator.CreateSingle();

            BandProcess
            .Expect(process =>
                    process.GetBand())
            .Return(entity)
            .Repeat.Once();
            BandProcess.Replay();

            var detailModel = CreateAboutModel();

            BandMapper
            .Expect(mapper =>
                    mapper.MapToAboutModel(entity))
            .Return(detailModel)
            .Repeat.Once();
            BandMapper.Replay();

            var result = Controller.About().Result as ViewResult;

            Assert.IsNotNull(result);

            BandProcess.VerifyAllExpectations();
            BandMapper.VerifyAllExpectations();
        }
Exemple #2
0
        protected override void AdditionalSetup()
        {
            base.AdditionalSetup();

            Mapper = new BandMapper(CatalogsContainer);
        }