public void MapModelToBO() { var mapper = new BOLContactTypeMapper(); ApiContactTypeRequestModel model = new ApiContactTypeRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); BOContactType response = mapper.MapModelToBO(1, model); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLContactTypeMapper(); BOContactType bo = new BOContactType(); bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); ApiContactTypeResponseModel response = mapper.MapBOToModel(bo); response.ContactTypeID.Should().Be(1); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLContactTypeMapper(); BOContactType bo = new BOContactType(); bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); List <ApiContactTypeResponseModel> response = mapper.MapBOToModel(new List <BOContactType>() { { bo } }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALContactTypeMapper(); ContactType entity = new ContactType(); entity.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); BOContactType response = mapper.MapEFToBO(entity); response.ContactTypeID.Should().Be(1); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }