Witam, piszę testy jednostkowe do projektu jednak większość z nich nie przechodzi z nie znanego mi powodu i na Internecie też nie dużo znalazłem a co to było to nie działa.
Problem jest taki, że wywala wyjątek System.IO.FileLoadException z zestawu Microsoft.Owin. v. 2.1.0.0
Nie wiem dokładnie kiedy taki wyjątek się pojawia. Tzn co jest przyczyną. Testy odwołują się do ApplicationDbContext a później nie wiem.
Np. taki nie przechodzi:
Assert.Throws<KeyNotFoundException>(
delegate
{
this._fixture._provider.AddPayment(-1, PaymentType.Cash, -1);
});
A taki już tak.
var list = this._fixture._provider.OrderStatesForInvoicing;
Assert.NotEmpty(list);
ASP.NET MVC, Xunit.
Testy uruchamiam na lokalnym komputerze z lokalną bazą danych.