Пример #1
0
 public virtual void Throw(FluentExpectFailedException exception)
 {
     if (this.ThrowExceptions)
         throw exception;
     else
         FluentAutomation.Settings.ExpectFailedCallback(exception);
 }
        public virtual void ReportError(string message, params object[] formatParams)
        {
            if (this.ThrowExceptions)
            {
                var assertException = new FluentAssertFailedException(message, formatParams);
                this.commandProvider.PendingAssertFailedExceptionNotification = new Tuple<FluentAssertFailedException, WindowState>(assertException, new WindowState
                {
                    Source = this.commandProvider.Source,
                    Url = this.commandProvider.Url
                });

                throw assertException;
            }
            else
            {
                var expectException = new FluentExpectFailedException(message, formatParams);
                this.commandProvider.PendingExpectFailedExceptionNotification = new Tuple<FluentExpectFailedException, WindowState>(expectException, new WindowState
                {
                    Source = this.commandProvider.Source,
                    Url = this.commandProvider.Url
                });
            }
        }