0
私のNancy API用にnunitテストセットアップを取得しようとしています。私はこのテストでそれをテストしようとするとユニットテストNancyFX API - ConfigurableBootstrapper例外
this.Get["/"] = _ =>
{
return Negotiate
.WithModel(" API is running")
.WithStatusCode(HttpStatusCode.OK);
};
:私は非常に単純なエンドポイントを持っている
this._browser = new Browser(with => {
with.Module(new IndexModule());
});
var result = this._browser.Get("/", with => { with.HttpRequest(); });
Assert.That(result.StatusCode, Is.EqualTo(HttpStatusCode.OK));
私はConfigurableBootstrapper例外を取得し、「OhNoes」のメッセージと共に。
私はリターンを変更する場合:
return "API is running";
それは動作します。私は、交渉された返品を可能にするために、テスト設定で何かが欠けているかもしれないと思う。
誰かが私が間違っていることを知っていますか?ありがとう。