public void MapEntityToModelList() { var mapper = new DALUserMapper(); User item = new User(); item.SetProperties(1, "A", 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, 1, 1, "A"); List <ApiUserServerResponseModel> response = mapper.MapEntityToModel(new List <User>() { { item } }); response.Count.Should().Be(1); }
public void MapEntityToModel() { var mapper = new DALUserMapper(); User item = new User(); item.SetProperties(1, "A", 1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1, 1, 1, "A"); ApiUserServerResponseModel response = mapper.MapEntityToModel(item); response.AboutMe.Should().Be("A"); response.AccountId.Should().Be(1); response.Age.Should().Be(1); response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.DisplayName.Should().Be("A"); response.DownVote.Should().Be(1); response.EmailHash.Should().Be("A"); response.Id.Should().Be(1); response.LastAccessDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Location.Should().Be("A"); response.Reputation.Should().Be(1); response.UpVote.Should().Be(1); response.View.Should().Be(1); response.WebsiteUrl.Should().Be("A"); }