The Artima Developer Community
Sponsored Link

Agile Buzz Forum
NSpecify Example

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Keith Ray

Posts: 658
Nickname: keithray
Registered: May, 2003

Keith Ray is multi-platform software developer and Team Leader
NSpecify Example Posted: Jul 26, 2006 10:55 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Keith Ray.
Original Post: NSpecify Example
Feed Title: MemoRanda
Feed URL: http://homepage.mac.com/1/homepage404ErrorPage.html
Feed Description: Keith Ray's notes to be remembered on agile software development, project management, oo programming, and other topics.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Keith Ray
Latest Posts From MemoRanda

Advertisement

On 2006 Jul 24, at 8:29 PM, Maruis Marais emailed to me:

Hi Keith,

Your posts around BDD is interesting. I'm in the .NET space and have followed the BDD movement since Dave Astels talked about BDD at XP2004 (I think).

I've developed a C# version of a BDD framework called NSpecify and thought you might find it interesting.

Here is a quick code example:


using System;
using NSpecify.Framework;

namespace SampleBehaviour
{
    [ Functionality() ]
    public class Calculation
    {
        int one = 1;
        int two = 2;

        [ Specification() ]
        public void OnePlusOneMustEqualTwo()
        {
            Specify.That( one + one ).Must.Equal( two );
            Specify.That( two ).Must.Be.GreaterThan( one );
            Specify.That( two ).Must.Not.Equal( one );
        }

        [ Specification(),
        ExpectedException(typeof(DivideByZeroException) ) ]
        public void OneDevidedByZeroMustThrowException()
        {
            int zero = 0;
            Specify.That( one / zero ).Must.Equal( one );
            Specify.Failure( "The expected exception was not  
thrown" );
        }
    }
}

I have a NUnit integration working and at the moment I'm working on creating a VS2005 test tip to integrate NSpecify into VSTS Testing Framework.

Read: NSpecify Example

Topic: Found Money Previous Topic   Next Topic Topic: Borland Exits the IDE Space

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use