IntelliTect / IntelliTect/TestTools
DatabaseFixture<T> does not support generic options
- 主要言語
- C#
- スター
- 10
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Reproduction steps:
Create context with a single constructor that takes in the generic DbContextOptions
```C#
public class BudgetContext : DbContext
{
public BudgetContext(DbContextOptions options)
: base(options)
{ }
}
```
Attempt to use the DatabaseFixture.
```C#
var fixture = new DatabaseFixture();
await fixture.PerformDatabaseOperation(async context =>
{
...
});
```
Observed:
System.InvalidOperationException: '***.BudgetContext' must contain a constructor that has a single parameter of type 'Microsoft.EntityFrameworkCore.DbContextOptions'
Expected:
I want my DbContext to take in the generic options overload.
コントリビューションガイド
調査の方向性
DatabaseFixture エントリポイントから開始し、レポートに示されている BudgetContext コンストラクターで問題を再現します。fixture が DbContext コンストラクターをどのように検証または選択するかを追跡します。汎用の DbContextOptions コンストラクターが受け入れられ、PerformDatabaseOperation が正常に完了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100