I’ve just upgraded the trunk to the final 1.5 version of xUnit released last week. This update now allows BDDExtensions to be used with the latest version independant resharper runner for xUnit from xunitcontrib.
Current Version is 1.0.1.16. You can download it here or get the latest sources from the trunk.
Happy specifying . . .
Over the past days I finally managed to spend some time with xUnit.BDDExtensions. I can’t possibly describe how good coming back to xUnit.net feels after working with MSTest in my last project. The speed, the extensibility model. It’s simply not comparable. MSTest is certainly a great tool in case you haven’t worked with a unit [...]
This post by Sean Feldman was kind of an eye opener to me. It introduced me to a feature of Rhino.Mocks I wasn’t really aware of and helped to solve a problem I was never able to solve in a really satisfying way.
As you might know xUnit.BDDExtensions is using Rhino.Mocks behind the scenes, but [...]
public class when_an_automatically_resolved_instance_with_a_single_dependency_is_used_in_a_fixture :
InstanceContextSpecification<ClassWithSingleDependency>
{
private object actualResult;
private IDependency dependency;
private object expectedResult;
protected override void EstablishContext()
{
expectedResult = new object();
dependency = AutoDependency<IDependency>();
dependency.WhenToldTo(x => x.Invoke()).Return(expectedResult);
}
protected override void Because()
{
actualResult = Sut.Invoke();
}
[Observation]
public void should_be_able_to_verify_calls_made_to_the_dependency()
{
dependency.WasToldTo(x => x.Invoke());
}
[Observation]
public void should_execute_the_configured_behavior_on_the_dependency()
{
actualResult.ShouldBeEqualTo(expectedResult);
}
}
This little feature was added to the trunk today. Yes, no CreateSut() call. You can omit it for most of the simple scenarios. You can [...]
Today I started writing my first build scripts in Ruby for a .NET project using Rake. This is what I came up with.
require 'rake/clean'
EXTERNALS_DIR = File.expand_path('../Externals')
BUILD_DIR = File.expand_path('../Bin')
SOURCE_DIR = File.expand_path('../Source')
CLEAN.include(FileList[File.join(BUILD_DIR, '*')])
desc "Compiles the gemini sources"
task :build do
gemini_solution = File.join(SOURCE_DIR, 'Gemini.sln')
sh "msbuild /property:WarningLevel=4;OutDir=#{BUILD_DIR}/ #{gemini_solution}"
end
desc "Runs all the tests on the [...]
I’ve been doing BDD with the “context/specificationt”- style for about 4 months now. Examples for this style are MSpec, NSpec or my little framework called xUnit.BDDExtensions.
What bothers me lately is that this style mixes context and behavior under test into one fixture class name, which can be extremely long because of that. An [...]
xUnit.BDDExtensions is a little framework build on top of xUnit which enables a BDD style of testing with xUnit.
Besides an emphasis on a “test case class per fixture” organization scheme for tests, AAA (Arrange, Act and Assert) style of writing tests and left to right assertions, this framework also provides Rhino.Mocks integration out of the [...]
Because of several requests I uploaded the little BDD extension I recently wrote for xunit. It’s basically a port of the framework JP Boodhoos currently uses in his famous Nothing but .Net bootcamps (he’s using MbUnit).
So here it is. Any feedback is appreciated . . .
Yesterday was an interesting evening. I tried to pinpoint the problem between the little BDD framework I used and the Resharper addin for xUnit.
A short description of my problem
I’m using a test-case-class-per-fixture organization and the template method pattern for writing tests in the AAA scheme. Besides that I use a specialized FactAttribute in order to [...]
My current tool of interest is XUnit. For those of you who haven’t heard of it it’s a relatively new unit testing framework from Brad Wilson and the original author of NUnit 2.0, James Newkirk. You can find it here.
Some of the things I really like about it:
It has a set of .NET 3.0 Extension [...]