예제 #1
0
        public void MapModelToEntity()
        {
            var mapper = new DALLinkLogMapper();
            ApiLinkLogServerRequestModel model = new ApiLinkLogServerRequestModel();

            model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A");
            LinkLog response = mapper.MapModelToEntity(1, model);

            response.DateEntered.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.LinkId.Should().Be(1);
            response.Log.Should().Be("A");
        }
예제 #2
0
        public void MapEntityToModelList()
        {
            var     mapper = new DALLinkLogMapper();
            LinkLog item   = new LinkLog();

            item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A");
            List <ApiLinkLogServerResponseModel> response = mapper.MapEntityToModel(new List <LinkLog>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
예제 #3
0
        public void MapEntityToModel()
        {
            var     mapper = new DALLinkLogMapper();
            LinkLog item   = new LinkLog();

            item.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A");
            ApiLinkLogServerResponseModel response = mapper.MapEntityToModel(item);

            response.DateEntered.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Id.Should().Be(1);
            response.LinkId.Should().Be(1);
            response.Log.Should().Be("A");
        }