Esempio n. 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);
        }
Esempio n. 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLChainMapper();
            ApiChainRequestModel model = new ApiChainRequestModel();

            model.SetProperties(1, Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", 1);
            BOChain response = mapper.MapModelToBO(1, model);

            response.ChainStatusId.Should().Be(1);
            response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Name.Should().Be("A");
            response.TeamId.Should().Be(1);
        }
Esempio n. 3
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);
        }