-
-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Description
When I updated to version 10.0.0 from 8.1.3 my tests started failing, because the InnerException of UniqueConstraintException is of type SqliteException with a given message.
In version 10.0.0 the UniqueConstraintException.InnerException is null.
My asserts are written like this.
var exception = Assert.Throws<UniqueConstraintException>(() => DatabaseContext.SaveChanges());
Assert.IsType<SqliteException>(exception.InnerException);
Assert.Equal("SQLite Error 19: 'UNIQUE constraint failed: Product.Id'.", exception.InnerException.Message);
It fails on this line Assert.IsType<SqliteException>(exception.InnerException);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels