Set up

Setup is very simple.
  • Download NBehave from trunk or a release.
  • If you downloaded the installer version, run installer to install nbehave.
    • The installer doe not put anything into the gac, it will register the testdriven.net runner if you choose to install it.
    • Installer also comes with examples, check them out.
  • Add a reference to NBehave.Narrator.Framework.dll if you are writing text specifications.
  • If you want to use nbehave's assert extensions for a test framework add reference to NBehave.Spec.dll and one the specific test framework you want to use, ex: nbehave.spec.nunit.dll. You must also reference the corresponding test framework dll(s), so if you added nbehave.spec.nunit.dll you must also reference nunit.framework.dll
    • let your spec/example/test class inherit from SpcBase or SpecBase<T> ,ex: NBehave.Spec.NUnit.SpecBase
    • override (if you want to) Establish_context() and Because_of()
    • tag your spec methods with [Specification] or the test framework's attribute, ex [Test] for NUnit and MbUnit.
  • Start writing specs.

Last edited Feb 1, 2010 at 5:45 PM by Lazydev, version 7

Comments

jonathanb Nov 18, 2008 at 2:18 AM 
These links seem to be down :(

gblosser Apr 11, 2008 at 7:20 PM 
Part 3 of the setup is here: http://codemonkey.nmonta.com/2007/08/06/setting-up-behave-part-3/