Ejemplo n.º 1
0
        public void SetUp()
        {
            _mapper = new Mapper();
            _mapper.Configurate <SourceModel, DestinationModel>();
            _mapper.Configurate <InternalSourceModel, InternalDestinationModel>();

            _sourceModel = new SourceModel();
        }
Ejemplo n.º 2
0
        public void Map_MappingSourceModelOnDestination_ShouldSetModelsFieldIdField()
        {
            // Arrange
            _sourceModel = this.FullFillModel();

            // Act
            var mappedModel = _mapper.Map <SourceModel, DestinationModel>(_sourceModel);

            // Assert
            Assert.AreEqual(_sourceModel.Model.Id, mappedModel.Model.Id);
        }
Ejemplo n.º 3
0
        public void Map_MappingSourceModelOnDestination_ModelShouldNotBeNull()
        {
            // Arrange
            _sourceModel = this.FullFillModel();

            // Act
            var mappedModel = _mapper.Map <SourceModel, DestinationModel>(_sourceModel);

            // Assert
            Assert.NotNull(mappedModel.Model);
        }
Ejemplo n.º 4
0
 public void CleanUp()
 {
     _sourceModel = new SourceModel();
 }