public void MapModelToBO() { var mapper = new BOLDeviceActionMapper(); ApiDeviceActionRequestModel model = new ApiDeviceActionRequestModel(); model.SetProperties(1, "A", "A"); BODeviceAction response = mapper.MapModelToBO(1, model); response.DeviceId.Should().Be(1); response.Name.Should().Be("A"); [email protected]().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLDeviceActionMapper(); BODeviceAction bo = new BODeviceAction(); bo.SetProperties(1, 1, "A", "A"); List <ApiDeviceActionResponseModel> response = mapper.MapBOToModel(new List <BODeviceAction>() { { bo } }); response.Count.Should().Be(1); }
public void MapBOToModel() { var mapper = new BOLDeviceActionMapper(); BODeviceAction bo = new BODeviceAction(); bo.SetProperties(1, 1, "A", "A"); ApiDeviceActionResponseModel response = mapper.MapBOToModel(bo); response.DeviceId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); [email protected]().Be("A"); }