public void HttpStatusCodeIsPopulated() { var ex = new TableNotFoundException("db", "sch", "tbl"); Assert.AreEqual(HttpStatusCode.InternalServerError, ex.ResponseCode); }
public void HttpErrorMessageIsPopulated() { var ex = new TableNotFoundException("db", "sch", "tbl"); Assert.AreEqual("TableNotFound", ex.HttpErrorMessage); }
public void IsBaseException() { var ex = new TableNotFoundException("db", "a", "b"); Assert.IsInstanceOfType(ex, typeof(BaseCaughtException)); }
public void ErrorMessageIsPopulated() { var ex = new TableNotFoundException("db", "sch", "tbl"); Assert.AreEqual("Table 'db.sch.tbl' not found.", ex.Message); }
/// <summary> /// Initializes a new instance of the <see cref="MissingTableError"/> class. /// </summary> /// <param name="table">The missing table that is defined in the DbContext model.</param> /// <param name="exception">The exception that occured when trying to get the table.</param> public MissingTableError(Table table, TableNotFoundException exception) : base(table) { MissingTableException = exception; }