Exemplo n.º 1
0
        public void MapRegionModelToAppRegistrationNoExistingRegionsReturnsSuccessForValidDataModelsWithLegacyRegions()
        {
            // Arrange
            var appRegistrationModel = ModelBuilders.ValidAppRegistrationModel(ModelBuilders.PathName);

            var legacyRegionModel = ModelBuilders.ValidLegacyRegionModel(ModelBuilders.PathName, Enums.PageRegion.Head);
            var validRegionModel  = ModelBuilders.ValidRegionModel(Enums.PageRegion.Head);

            A.CallTo(() => fakeMapper.Map <RegionModel>(legacyRegionModel));

            // Act
            modelMappingService.MapRegionModelToAppRegistration(appRegistrationModel, legacyRegionModel);

            // assert
            A.CallTo(() => fakeMapper.Map <RegionModel>(legacyRegionModel)).MustHaveHappenedOnceExactly();

            Assert.NotNull(appRegistrationModel.Regions);
        }