public void MapModelToEntity() { var mapper = new DALFollowingMapper(); ApiFollowingServerRequestModel model = new ApiFollowingServerRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); Following response = mapper.MapModelToEntity(1, model); response.DateFollowed.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Muted.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALFollowingMapper(); Following item = new Following(); item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); ApiFollowingServerResponseModel response = mapper.MapEntityToModel(item); response.DateFollowed.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Muted.Should().Be("A"); response.UserId.Should().Be(1); }
public void MapEntityToModelList() { var mapper = new DALFollowingMapper(); Following item = new Following(); item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); List <ApiFollowingServerResponseModel> response = mapper.MapEntityToModel(new List <Following>() { { item } }); response.Count.Should().Be(1); }