NUnitに関するkunymのブックマーク (3)

  • NUnitまとめ - 技術情報Wiki

    入手方法† ここ↓へ行って最新版を取ってくる。 http://sourceforge.net/projects/nunit 2006.5.9時点の最新版はIteration Release 2.2.8 http://sourceforge.net/forum/forum.php?forum_id=564881 "File" のリンクを選ぶ Iteration Releaseの説明 An Iteration Release is an incremental release of the NUnit software at it's current state of development. This release includes an experimental extensibility mechanism, a major revision of the source code or

    kunym
    kunym 2012/10/03
    NUnitのまとめ
  • NUnit 2.5 が便利すぎる - ぐるぐる~

    NUnit 2.5 RC - ZOETROPEの日記 これみてもらえればもうほとんど言うことって残ってないんですが・・・ 一応、ちょっと補足的な情報を。 TestCase 元エントリでは引数が 3 つとなってますけど、3 つ以上も可能でした。 [TestFixture] public class AttributeTestSample { [TestCase(1, 2, 3, 6)] [TestCase(10, 20, 30, 60)] [TestCase(10, 10, 10, 30)] public void TestCaseSample(int x, int y, int z, int expected) { Assert.That(x + y + z, Is.EqualTo(expected)); } } TestCaseSource との使い分けの指針としては、 コンパイル時定数

    NUnit 2.5 が便利すぎる - ぐるぐる~
    kunym
    kunym 2012/10/03
    NUnit2.5の機能解説。TestCase、例外のテスト。
  • [ブログ紹介] NUnit 2.5 で追加された Assert.Throws - TDD.NET

    NUnit 2.5 で追加された機能のひとつ、 Assert.Throws() について紹介されています。 OPC Diary: NUnit 2.5 で追加された Assert.Throws での注意点 2010年03月03日 NUnit 2.5 から Assert.Throws というメソッドが追加されていて、 インラインでエクセプションのテストができるように拡張されています。 たとえば、 null を渡したら ArgumentException を投げ返して欲しいメソッド ExceptionDashimakuri() を作るためのテストを書くとします。 従来のやり方では、 次のように書けます。 ( 実行してみていないので、 間違いがあっても許してください。 ) try{ ExceptionDashimakuri(null); Assert.Fail("例外が発生しなかった!"); }

    [ブログ紹介] NUnit 2.5 で追加された Assert.Throws - TDD.NET
    kunym
    kunym 2012/10/03
    例外のテスト
  • 1