Visual Studio 2015 RC で xUnit を使ってみた
Visual Studio 2015 RC で xUnit を使ってみた。
Getting Started with xUnit.net and DNX / ASP.NET 5 > xUnit.net
このドキュメント以上の内容は無いけどメモ。
環境
- Windows 10 Insider Preview
- Visual Studio 2015 RC
- "xunit": "2.1.0-beta2-*",
メモ
Visual Studio 2015 RC で .xproj の クラスライブラリのプロジェクトを作成する。

project.json に、以下の部分を追加する。
"dependencies": {
"xunit": "2.1.0-beta2-*",
"xunit.runner.dnx": "2.1.0-beta2-*"
},
"commands": {
"test": "xunit.runner.dnx"
},テストコードはたとえば以下のように。

コマンドプロンプトで
dnvm upgrade
をたたいておく。
テストの実行
テストの実行は、
- コマンドから
テストプロジェクトのフォルダにて、
dnx . test
をたたく。

- あるいは、 Visual Studio 2015 RC のボタンから

- あるいは、テストエクスプローラーから
