public virtual ApiDeviceResponseModel MapBOToModel( BODevice boDevice) { var model = new ApiDeviceResponseModel(); model.SetProperties(boDevice.Id, boDevice.Name, boDevice.PublicId); return(model); }
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")); }