Windows 7 Installation

Recently I purchased a new laptop with Windows 7 Premium and a Windows 7 Pro upgrade DVD. It was only during this process that I discovered that you can’t upgrade. The process insists on replacing the entire operating system.

At the end of this I was left with a PC with a VGA display and no network stack. I can’t believe that a modern operating system fails to install a minimal network connection.

Eventually I found that the restore process provides an installer that provides the 5 missing drivers. Why the upgrade process could not have copied them from the previous installation is best put to the developers at microsoft. In addtion could someone explain why a machine needs to reboot 5 times?

A definition of the Gerkin requirements language

https://github.com/cucumber/cucumber/wiki/Gherkin

1: Feature: Some terse yet descriptive text of what is desired
2: In order to realize a named business value
3: As an explicit system actor
4: I want to gain some beneficial outcome which furthers the goal
5:
6: Scenario: Some determinable business situation
7: Given some precondition
8: And some other precondition
9: When some action by the actor
10: And some other action
11: And yet another action
12: Then some testable outcome is achieved
13: And something else we can check happens too
14:
15: Scenario: A different situation
16: …

There are several .Net implementations that use Gerkin (or a fluent equivalent) to produce acceptance tests such as StoryQ

I like the idea of sending the business users reports that demonstrate that the requirements are met.

Adventures in MVC and Entity Framework

Recently I have been studying the ASP.Net MVC 3, EF and MVC Scaffolding.

I have been having fun getting these to install on the VS 2010 Web Express Edition.
I started with the ASP.Net MVC 3 installer. This worked.
It includes NuGet (although as I later found out this is v1.2).
I used NuGet to add MVC Scaffolding. This failed to install corrected declaring a dependency upon NuGet 1.4
Eventually I found that if you uninstalled NuGet, downloaded the latest version and installed it as an administrator then it worked.

I also found some other details about the NuGet Package management console. It is simple an embedded version of PowerShell that has full access to your machine.
This means that any unknown command will attempt to use any exe’s on your path.

I was also caught out when I used an empty MVC project as a starting point. I kept on getting resource not found for my main page. I had neglected to add an HomeIndex.

Minimal StoryQ demo

// StoryQ demo

This is a basic demo of using StoryQ.
You need to implement the void methods with wrappers around the system functionality under test.

Note this uses the Given/When/Then pattern as opposed to the normal NUnit Assemble, Action, Assert.

using System;
using NUnit.Framework;

using StoryQ;

namespace Experiments
{

[TestFixture]
public class FirstTest
{

[Test]
public void SunshinePath()
{
new Story(“User Management”).InOrderTo(“Add User”)
.AsA(“Admin”).IWant(“To Add a User to the system”)
.WithScenario(“HappyPath”)
.Given(IHaveEnteredUserName)
.When(IPressSave)
.Then(UserIsAdded)
.And(IAmReturnedToTheMainWindow)
.WithScenario(“UserExists”)
.Given(IHaveEnteredUserName)
.When(IPressSave)
.And(UserAlreadyExists)
.Then(IAmShownErrorMessage)
.ExecuteWithReport();
}

private void IHaveEnteredUserName()
{
throw new NotImplementedException();
}

private void IPressSave()
{
throw new NotImplementedException();
}

private void UserIsAdded()
{
throw new NotImplementedException();
}

private void IAmReturnedToTheMainWindow()
{
throw new NotImplementedException();
}

private void UserAlreadyExists()
{
throw new NotImplementedException();
}

private void IAmShownErrorMessage()

{

throw new NotImplementedException();

}

}

}