public async Task SendDomainNotificationsForTest() { await SendDomainNotification( DomainNotificationEventTypeEnum.Error, "ERROR_A", "MESSAGE_A" ); var validationResult = new ValidationResult(); validationResult.AddInformationMessage("INFO_A", "", "MESSAGE A"); validationResult.AddWarningMessage("WARNING_A", "", "MESSAGE A"); await SendDomainNotifications(validationResult); }
public async Task DomainModelBase_FactoryCreateWithValidationResult_Success() { await RunWithTelemetryAsync( totalOfExecutions : 1, runInParallel : false, handler : async execution => { #region Arrange var customerFactory = new CustomerFactory(); var validationResult = new ValidationResult(); validationResult.AddInformationMessage("MCB", "MCB_SPEC", "Marcelo Castelo"); #endregion #region Act var customer = customerFactory.Create(validationResult); #endregion #region Assert return(await Task.FromResult(customer?.ValidationResult?.MessageCollection?.Any(q => q?.Code == "MCB") == true).ConfigureAwait(false)); #endregion }); }
public async Task ValidationResult_GetInfoMessages_Success() { await RunWithTelemetryAsync( totalOfExecutions : 1, runInParallel : false, handler : async execution => { #region Arrange var result = false; var validationResult = new ValidationResult(); validationResult.AddInformationMessage("MCB", "MCB", "MCB"); #endregion #region Act result = validationResult.InfoMessageCollection.Any(); #endregion #region Assert return(await Task.FromResult(result).ConfigureAwait(false)); #endregion } ).ConfigureAwait(false); }