You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
irxground edited this page Sep 8, 2012
·
2 revisions
.NET のLambda式を使って以下のようにテストが書けるようにしたい。
classProgram{publicvoidMain(){Spec.RunAllTest();}[TestCase]publicvoidMethodA(){Spec.Describe("Integer is addable.").Assert(1+1, v =>v==2);Spec.Assert(3-2, v =>v==1).Describe("Integer is subtractable.");Spec.Target(10).Should(x =>x>9).Should(x =>x%2==0)
Spec.Target(()=>{thrownewNotImplementedException()}).ShouldThorow<NotImplementedException>()}}