EF6 分離レベルをテストしていますが、テストは次のように失敗します。
Assert.AreEqual failed. Expected:<ReadUncommitted>. Actual:<Unspecified>.
テスト:
public void TestIsolationLevelReadUncommitted()
{
// Arrange
using (
new TransactionScope(TransactionScopeOption.Required,
new TransactionOptions {IsolationLevel = IsolationLevel.ReadUncommitted}))
{
using (var context = new BoligEntities())
{
// Act
context.GetDbConnection().Open();
var isolationLevel = context.GetDbConnection().GetIsolationLevel();
// Assert
Assert.AreEqual(System.Data.IsolationLevel.ReadUncommitted, isolationLevel);
}
}
}
テストはあまり意味がありませんが、なぜ失敗するのか疑問に思っています。