예제 #1
0
        public virtual ApiDeviceResponseModel MapBOToModel(
            BODevice boDevice)
        {
            var model = new ApiDeviceResponseModel();

            model.SetProperties(boDevice.Id, boDevice.Name, boDevice.PublicId);

            return(model);
        }
예제 #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiDeviceModelMapper();
            var model  = new ApiDeviceResponseModel();

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

            response.Name.Should().Be("A");
            response.PublicId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }