public void MapModelToEntity() { var mapper = new DALChainStatusMapper(); ApiChainStatusServerRequestModel model = new ApiChainStatusServerRequestModel(); model.SetProperties("A"); ChainStatus response = mapper.MapModelToEntity(1, model); response.Name.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALChainStatusMapper(); ChainStatus item = new ChainStatus(); item.SetProperties(1, "A"); ApiChainStatusServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapEntityToModelList() { var mapper = new DALChainStatusMapper(); ChainStatus item = new ChainStatus(); item.SetProperties(1, "A"); List <ApiChainStatusServerResponseModel> response = mapper.MapEntityToModel(new List <ChainStatus>() { { item } }); response.Count.Should().Be(1); }