public void MapModelToEntity() { var mapper = new DALSpeciesMapper(); ApiSpeciesServerRequestModel model = new ApiSpeciesServerRequestModel(); model.SetProperties("A"); Species response = mapper.MapModelToEntity(1, model); response.Name.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALSpeciesMapper(); Species item = new Species(); item.SetProperties(1, "A"); ApiSpeciesServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapEntityToModelList() { var mapper = new DALSpeciesMapper(); Species item = new Species(); item.SetProperties(1, "A"); List <ApiSpeciesServerResponseModel> response = mapper.MapEntityToModel(new List <Species>() { { item } }); response.Count.Should().Be(1); }