コード例 #1
0
        public virtual ApiLifecycleResponseModel MapBOToModel(
            BOLifecycle boLifecycle)
        {
            var model = new ApiLifecycleResponseModel();

            model.SetProperties(boLifecycle.Id, boLifecycle.DataVersion, boLifecycle.JSON, boLifecycle.Name);

            return(model);
        }
コード例 #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiLifecycleModelMapper();
            var model  = new ApiLifecycleResponseModel();

            model.SetProperties("A", BitConverter.GetBytes(1), "A", "A");
            ApiLifecycleRequestModel response = mapper.MapResponseToRequest(model);

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