public async Task ULN_IsMapped(PauseRequest request) { var mapper = new PauseRequestToViewModelMapper(mockCommitmentsApiClient.Object); var result = await mapper.Map(request); Assert.AreEqual(ExpectedUln, result.ULN); }
public void Pause(string caller_trace) { PauseRequest pauseRequest = new PauseRequest(); pauseRequest.arguments.threadId = threadId; Assert.True(VSCodeDebugger.Request(pauseRequest).Success, @"__FILE__:__LINE__" + "\n" + caller_trace); }
public async Task AccountHashedId_IsMapped(PauseRequest request) { var mapper = new PauseRequestToViewModelMapper(mockCommitmentsApiClient.Object); var result = await mapper.Map(request); Assert.AreEqual(request.AccountHashedId, result.AccountHashedId); }
public static void Pause() { PauseRequest pauseRequest = new PauseRequest(); pauseRequest.arguments.threadId = threadId; Assert.True(VSCodeDebugger.Request(pauseRequest).Success); }
public async Task ApprenticeName_IsMapped(PauseRequest request) { var mapper = new PauseRequestToViewModelMapper(mockCommitmentsApiClient.Object); var result = await mapper.Map(request); Assert.AreEqual(ExpectedFullName, result.ApprenticeName); }
private void Pause_Click(object sender, EventArgs e) { if (MessageBox.Show(this, "Are you sure you want to pause the process?", "Confirmation required.", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { PauseRequest?.Invoke(this, EventArgs.Empty); } }
public void ThenValidatesApprenticeshipHashedId(string apprenticeshipHashedId, bool expectedValid) { var request = new PauseRequest { ApprenticeshipHashedId = apprenticeshipHashedId }; AssertValidationResult(x => x.ApprenticeshipHashedId, request, expectedValid); }
public void ThenValidatesAccountHashedId(string accountHashedId, bool expectedValid) { var request = new PauseRequest { AccountHashedId = accountHashedId }; AssertValidationResult(x => x.AccountHashedId, request, expectedValid); }
public void Pause() { CheckProfileHasMaster(); CheckProfileHasVM(); Log(string.Format("Pausing VM '{0}'.", profile.VM)); PauseRequest request = new PauseRequest() { Vm = profile.VM }; GetMasterClient().Pause(request); }
private IEnumerator PauseOut() { m_pauseLock = true; m_canvasAnim.SetBool("PauseVisible", false); yield return(new WaitForSeconds(1f)); PauseRequest?.Invoke(this, false); m_canvasAnim.SetBool("OverlayPause", false); yield return(new WaitForSeconds(1f)); PauseExit?.Invoke(this, null); m_fogCtrl.SetActive(m_retFogEnabled); m_pauseLock = false; }
public void Play_Pause_Video() { DataReqEventArgs eData = new DataReqEventArgs(); if (PlayCtrlContent == "Play") { PlayRequest?.Invoke(this, eData); PlayCtrlContent = "Pause"; } else { PauseRequest?.Invoke(this, eData); PlayCtrlContent = "Play"; } }
private IEnumerator PauseIn() { PauseRequest?.Invoke(this, true); m_pauseLock = true; m_retFogEnabled = m_fogCtrl.IsActive; m_fogCtrl.SetActive(false); yield return(new WaitForSeconds(.35f)); m_canvasAnim.SetBool("OverlayPause", true); yield return(new WaitForSeconds(1f)); PauseEnter?.Invoke(this, null); yield return(new WaitForSeconds(1f)); m_canvasAnim.SetBool("PauseVisible", true); m_pauseLock = false; }
public PauseResponse Pause(PauseRequest request) { log.InfoFormat("Pause:\n VM: {0}", request.Vm); string output; int exitCode = ExecuteVBoxCommand("VBoxManage.exe", string.Format("controlvm \"{0}\" pause", request.Vm), TimeSpan.FromSeconds(30), out output); if (exitCode != 0) { throw OperationFailed( "Failed to pause the virtual machine.", ErrorDetails(exitCode, output)); } return(new PauseResponse()); }
public PauseResponse Pause(PauseRequest request) { log.InfoFormat("Pause:\n VM: {0}", request.Vm); string output; int exitCode = ExecuteVBoxCommand("VBoxManage.exe", string.Format("controlvm \"{0}\" pause", request.Vm), TimeSpan.FromSeconds(30), out output); if (exitCode != 0) { throw OperationFailed( "Failed to pause the virtual machine.", ErrorDetails(exitCode, output)); } return new PauseResponse(); }
public void Pause() { CheckProfileHasMaster(); CheckProfileHasVM(); Log(string.Format("Pausing VM '{0}'.", profile.VM)); PauseRequest request = new PauseRequest() { Vm = profile.VM }; GetMasterClient().Pause(request); }
public static void Pause(int pThreadId) { PauseRequest pr = new PauseRequest(); mClient.SendRequestSync(pr); }
private void AssertValidationResult <T>(Expression <Func <PauseRequest, T> > property, PauseRequest instance, bool expectedValid) { var validator = new PauseRequestValidator(); if (expectedValid) { validator.ShouldNotHaveValidationErrorFor(property, instance); } else { validator.ShouldHaveValidationErrorFor(property, instance); } }
public async Task <IActionResult> PauseApprenticeship(PauseRequest request) { var viewModel = await _modelMapper.Map <PauseRequestViewModel>(request); return(View(viewModel)); }