Ejemplo n.º 1
0
        public virtual ApiMachinePolicyResponseModel MapBOToModel(
            BOMachinePolicy boMachinePolicy)
        {
            var model = new ApiMachinePolicyResponseModel();

            model.SetProperties(boMachinePolicy.Id, boMachinePolicy.IsDefault, boMachinePolicy.JSON, boMachinePolicy.Name);

            return(model);
        }
Ejemplo n.º 2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiMachinePolicyModelMapper();
            var model  = new ApiMachinePolicyResponseModel();

            model.SetProperties("A", true, "A", "A");
            ApiMachinePolicyRequestModel response = mapper.MapResponseToRequest(model);

            response.IsDefault.Should().Be(true);
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }