Beispiel #1
0
 public void Initialize()
 {
     _creativePanel     = CreativePanelFactory.CreateCreativePanelDomainObject();
     _creativePanelDto  = CreativePanelFactory.CreateCreativePanelDtoObject();
     _creativePanelDtos = CreativePanelFactory.CreateCreativePanelDtoObjectEnumerable();
     AutoMapperConfig.MapTypes();
 }
Beispiel #2
0
        public void Can_Convert_CreativePanelDto_And_Resulting_Panel_Values_Match_PanelDto_Values()
        {
            CreativePanel creativePanel = _creativePanelDto.ConvertToDomainModel();

            Assert.AreEqual(creativePanel.CreativeId, _creativePanelDto.CreativeId, "CreativePanel CreativeId did not map to CreativePanelDto CreativeId.");
            Assert.AreEqual(creativePanel.PanelId, _creativePanelDto.PanelId, "CreativePanel PanelId did not map to CreativePanelDto PanelId.");
            Assert.AreEqual(creativePanel.PanelAlias, _creativePanelDto.PanelAlias, "CreativePanel PanelAlias did not map to CreativePanelDto PanelAlias.");
            Assert.AreEqual(creativePanel.IsPrimaryPanel, _creativePanelDto.IsPrimaryPanel, "CreativePanel IsPrimaryPanel indicator did not map to CreativePanelDto IsPrimaryPanel indicator.");
        }
Beispiel #3
0
 public static CreativePanelDto ConvertToDto(this CreativePanel domainModel)
 {
     return(Mapper.Map <CreativePanelDto>(domainModel));
 }
Beispiel #4
0
        public void Can_Convert_CreativePanelDto_To_A_Valid_CreativePanelDomainModel()
        {
            CreativePanel creativePanel = _creativePanelDto.ConvertToDomainModel();

            Assert.IsNotNull(creativePanel, "CreativePanel is null");
        }