Search And Destroy

Look out honey, ’cause I’m using technology!

Archive for December, 2010

QuickDotNetCheck : Preview

Posted by kilfour on December 28, 2010

Considering :

public class ListDeleter
{
    public void DoingMyThing(IList<int> theList, int iNeedToBeRemoved)
    {
        theList.Remove(iNeedToBeRemoved);
    }            
}

We define the following Spec :
public class ListDeleterSpecs : ListDeleterFixture
{
    [Spec]
    public void List_Does_Not_Contain_Removed_Value()
    {
        Ensure.False(list.Contains(toRemove));
    }
}

And implement a QuickDotNetCheck Fixture :
public class ListDeleterFixture : Fixture
{
    private readonly ListDeleter listDeleter = new ListDeleter();
    private readonly IntGenerator intGen = new IntGenerator(1, 20);

    protected IList<int> list;
    protected int toRemove;

    public override void Arrange()
    {
        toRemove = intGen.GetRandomValue();

        list = 
            new GeneratorRepository()
                .With<int>(intGen)
                .Randoms<int>(1, 100)
                .ToList();
    }

    protected override void Act()
    {
        listDeleter.DoingMyThing(list, toRemove);
    }

    [Fact]
    public void VerifyAll() // Assert is already spoken for by BaseFixture
    {
        new Suite(1, 1000)
            .Register(() => new ListDeleterFixture())
            .Run();
    }
}

Resulting in something like :

  Falsifiable after 1 test(s), 375 Transition(s).
  ListDeleterSpecs.List_Does_Not_Contain_Removed_Value failed.
  --------------------Simplest Fail Case--------------------
  ListDeleterFixture
  theInt : System.Int32 : 52
  theList: List Of System.Int32 : 
      52
      52

Posted in Checking Stuff Out, QuickDotNetCheck, QuickNet | Leave a Comment »

On the Tdd Apostate

Posted by kilfour on December 22, 2010

+1.

Posted in Rants | 2 Comments »

On Apologies

Posted by kilfour on December 17, 2010

To all those that were following the ‘On What’s On My Mind’ series with interest.

I started writing the series when I was in between jobs.

I’m currently involved with a project were a lot of the ideas of the ‘On What’s On My Mind’ series are being used.
Only excluding the property-based testing part.

I always prefer seeing how an idea performs in the wild over an academic example, so I’m going to spend some time seeing where this project goes, but I will consolidate, and continue the On What’s On My Mind’ series at a later date.

For now though, …, happy holidays ;-) .

Posted in QuickPlanner, Rants | Leave a Comment »

On What’s On My Mind, Interlude

Posted by kilfour on December 7, 2010

I recently got involved with a project, which has a lot more people working on it, thinking the way I do, than I have been accustomed too in the past few years.

This project really is a real world example of how ‘common sense’ a.k.a. craftsmanship delivers customer value.

Anybody who is familiar with the extreme programming methodology can jump in, and in no time at all, starts delivering.

You can call it anything you want, slap any buzzword driven development label on it you want, run it through your favourite meaningless documentation generator, but in the end it boils down to craftmanship.
The mere fact that everyone on the team almost takes it as a personal insult if a bug makes it into production, displays pride.

The pride one takes in one’s craft, so to speak, … pompously, … delivers … value.

Posted in Rants | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.