示例#1
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLChainMapper();
            BOChain bo     = new BOChain();

            bo.SetProperties(1, 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", 1);
            List <ApiChainResponseModel> response = mapper.MapBOToModel(new List <BOChain>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
示例#2
0
        public void MapBOToModel()
        {
            var     mapper = new BOLChainMapper();
            BOChain bo     = new BOChain();

            bo.SetProperties(1, 1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", 1);
            ApiChainResponseModel response = mapper.MapBOToModel(bo);

            response.ChainStatusId.Should().Be(1);
            response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
            response.TeamId.Should().Be(1);
        }