コード例 #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLLifecycleMapper();
            ApiLifecycleRequestModel model = new ApiLifecycleRequestModel();

            model.SetProperties(BitConverter.GetBytes(1), "A", "A");
            BOLifecycle response = mapper.MapModelToBO("A", model);

            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
コード例 #2
0
        public void MapBOToModelList()
        {
            var         mapper = new BOLLifecycleMapper();
            BOLifecycle bo     = new BOLifecycle();

            bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A");
            List <ApiLifecycleResponseModel> response = mapper.MapBOToModel(new List <BOLifecycle>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
コード例 #3
0
        public void MapBOToModel()
        {
            var         mapper = new BOLLifecycleMapper();
            BOLifecycle bo     = new BOLifecycle();

            bo.SetProperties("A", BitConverter.GetBytes(1), "A", "A");
            ApiLifecycleResponseModel response = mapper.MapBOToModel(bo);

            response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1));
            response.Id.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }