コード例 #1
0
        public void MapBOToModel()
        {
            var             mapper = new BOLSelfReferenceMapper();
            BOSelfReference bo     = new BOSelfReference();

            bo.SetProperties(1, 1, 1);
            ApiSelfReferenceResponseModel response = mapper.MapBOToModel(bo);

            response.Id.Should().Be(1);
            response.SelfReferenceId.Should().Be(1);
            response.SelfReferenceId2.Should().Be(1);
        }
コード例 #2
0
        public void MapBOToModelList()
        {
            var             mapper = new BOLSelfReferenceMapper();
            BOSelfReference bo     = new BOSelfReference();

            bo.SetProperties(1, 1, 1);
            List <ApiSelfReferenceResponseModel> response = mapper.MapBOToModel(new List <BOSelfReference>()
            {
                { bo }
            });

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