예제 #1
0
        public void MapBOToModel()
        {
            var     mapper = new BOLTableMapper();
            BOTable bo     = new BOTable();

            bo.SetProperties(1, "A");
            ApiTableResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
예제 #2
0
        public void MapBOToEF()
        {
            var mapper = new DALTableMapper();
            var bo     = new BOTable();

            bo.SetProperties(1, "A");

            Table response = mapper.MapBOToEF(bo);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
예제 #3
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLTableMapper();
            BOTable bo     = new BOTable();

            bo.SetProperties(1, "A");
            List <ApiTableResponseModel> response = mapper.MapBOToModel(new List <BOTable>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }