コード例 #1
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);
        }
コード例 #2
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");
        }