public void MapBOToModelList() { var mapper = new BOLVotesMapper(); BOVotes bo = new BOVotes(); bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1); List <ApiVotesResponseModel> response = mapper.MapBOToModel(new List <BOVotes>() { { bo } }); response.Count.Should().Be(1); }
public void MapModelToBO() { var mapper = new BOLVotesMapper(); ApiVotesRequestModel model = new ApiVotesRequestModel(); model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1); BOVotes response = mapper.MapModelToBO(1, model); response.BountyAmount.Should().Be(1); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.PostId.Should().Be(1); response.UserId.Should().Be(1); response.VoteTypeId.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLVotesMapper(); BOVotes bo = new BOVotes(); bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1); ApiVotesResponseModel response = mapper.MapBOToModel(bo); response.BountyAmount.Should().Be(1); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Id.Should().Be(1); response.PostId.Should().Be(1); response.UserId.Should().Be(1); response.VoteTypeId.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALVotesMapper(); Votes entity = new Votes(); entity.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1, 1); BOVotes response = mapper.MapEFToBO(entity); response.BountyAmount.Should().Be(1); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Id.Should().Be(1); response.PostId.Should().Be(1); response.UserId.Should().Be(1); response.VoteTypeId.Should().Be(1); }