public void EnsureUpdate_uses_api_executor() { var certAttributes = new CompanyCertAttributes( "name", new CompanyCertType(CompanyCertType.TypeEnum.Operationssigning), new CompanyCertStatus(CompanyCertStatus.TypeEnum.Trusted)); _securityApi.Update("fingerPrint", certAttributes); _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, string, CompanyCertAttributes, SuccessResponse> >(), "fingerPrint", "sessionToken", certAttributes)); }
/// <summary> /// Update a company certificate. /// </summary> /// <returns>Success response.</returns> public SuccessResponse Update(string fingerPrint, CompanyCertAttributes certAttributes) { try { return(_apiExecutor.Execute(_securityApi.V1UpdateAsync, fingerPrint, _authTokens.SessionToken, certAttributes)); } catch (Exception e) { _log?.LogError(0, e, "An error has occured while trying update a company certificate."); throw; } }
public void EnsureUpdate_uses_api_executor() { var certAttributes = new CompanyCertAttributes() { Name = "name", Type = new CompanyCertType() { Type = CompanyCertTypeType.OPERATIONSSIGNING }, Status = new CompanyCertStatus() { Type = CompanyCertStatusType.TRUSTED } }; _securityApi.Update("fingerPrint", certAttributes); _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, string, CompanyCertAttributes, CancellationToken, Task <SuccessResponse> > >(), "fingerPrint", "sessionToken", certAttributes, default(CancellationToken))); }
/// <summary> /// Update a company certificate. /// </summary> /// <returns>Success response.</returns> public SuccessResponse Update(string fingerPrint, CompanyCertAttributes certAttributes) { return(_apiExecutor.Execute(_securityApi.V1CompanycertFingerPrintUpdatePost, fingerPrint, _authTokens.SessionToken, certAttributes)); }