CSharp/NUnit/Home.md
... ...
@@ -4,6 +4,7 @@
4 4
# Visual Studio 設定
5 5
- NUnit にパスが通っていること。
6 6
- Visual C# 2010 Express だと、外部ツールとビルドイベントとでマクロの値が違うのはなんでなんだぜ。(--#)
7
+
7 8
| | 外部ツール | ビルドイベント |
8 9
| --- | --- | --- |
9 10
| TargetPath | **obj**\Release\$(TargetName)$(TargetExt) | **bin**\Release\$(TargetName)$(TargetExt) |
... ...
@@ -16,8 +17,10 @@
16 17
17 18
## 随時実行
18 19
- 「ツール - 外部ツール」に追加する。
19
-| タイトル | NUnit(&U) |
20
+
21
+| 項目 | 値 |
20 22
| --- | --- |
23
+| タイトル | NUnit(&U) |
21 24
| コマンド | nunit-console-x86.exe |
22 25
| 引数 | "$(BinDir)$(TargetName)$(TargetExt)" |
23 26
| 初期ディレクトリ | "$(BinDir)" |
... ...
@@ -28,14 +31,16 @@
28 31
29 32
## ビルド時に自動実行
30 33
- 単体テストのコードを含むプロジェクトのプロパティを開き、「ビルドイベント」で設定する。
31
-| ビルド後に実行するコマンドライン<br />(NUnit 2.x) | if "$(ConfigurationName)" == "Release" (<br />&nbsp; cd /d "$(TargetDir)"<br />&nbsp; if "$(PlatformName)" == "x64" (<br />&nbsp; &nbsp; nunit-console.exe "$(TargetPath)"<br />&nbsp; ) else if "$(PlatformName)" == "x86" (<br />&nbsp; &nbsp; nunit-console-x86.exe "$(TargetPath)"<br />&nbsp; ) else (<br />&nbsp; &nbsp; echo "NUnit skipped on platform: $(PlatformName)"<br />&nbsp; )<br />) |
34
+
35
+| 項目 | 値 |
32 36
| --- | --- |
37
+| ビルド後に実行するコマンドライン<br />(NUnit 2.x) | if "$(ConfigurationName)" == "Release" (<br />&nbsp; cd /d "$(TargetDir)"<br />&nbsp; if "$(PlatformName)" == "x64" (<br />&nbsp; &nbsp; nunit-console.exe "$(TargetPath)"<br />&nbsp; ) else if "$(PlatformName)" == "x86" (<br />&nbsp; &nbsp; nunit-console-x86.exe "$(TargetPath)"<br />&nbsp; ) else (<br />&nbsp; &nbsp; echo "NUnit skipped on platform: $(PlatformName)"<br />&nbsp; )<br />) |
33 38
| ビルド後に実行するコマンドライン<br />(NUnit 3.x) | if "$(ConfigurationName)" == "Release" (<br />&nbsp; cd /d "$(TargetDir)"<br />&nbsp; nunit3-console.exe "$(TargetPath)" --result="$(TargetName).xml"<br />) |
34 39
| ビルド後に実行するコマンドライン<br />(NUnit 3.x + ReportUnit) | if "$(ConfigurationName)" == "Release" (<br />&nbsp; NUnit_Report "$(TargetDir)" "$(TargetPath)" "$(TargetName)"<br />) |
35 40
| ビルド後イベントの実行 | ビルドがプロジェクト出力を更新したとき |
36 41
37 42
### NUnit_Report.bat
38
-```dosbatch
43
+```dos
39 44
set TargetDir=%1
40 45
set TargetPath=%2
41 46
set TargetName=%3
... ...
@@ -76,7 +81,7 @@ exit /b %ErrorCount%
76 81
77 82
# おまけ
78 83
- マクロ値確認に使ったバッチファイル
79
-```dosbatch
84
+```dos
80 85
@echo off
81 86
echo %cd%
82 87
:loop
CSharp/NUnit/NUnit-VS-TagJump.md
... ...
@@ -29,8 +29,9 @@ if "$(ConfigurationName)" == "Release" (
29 29
```
30 30
31 31
## 外部ツール
32
-| Title | NUnit(&U) |
32
+| 項目 | 値 |
33 33
| --- | --- |
34
+| Title | NUnit(&U) |
34 35
| Command | NUnit_VS.bat |
35 36
| Arguments | "$(BinDir)" "$(BinDir)$(TargetName)$(TargetExt)" |
36 37
| Initial directory | "$(BinDir)" |