ID

Uploaded

Status

Description

Work Items

Action

3295
by krugs525
Jul 10, 2009
12:41 AM

Being evaluated

Here some NUnit assertions that I've added to my own project and have been using quite extensively...

public static void ShouldContain<T>(this IEnumerable<T> list, params Func<T, bool>[] whereClauses)
public static void ShouldNotContain<T>(this IEnumerable<T> list, params Func<T, bool>[] whereClauses)
public static void ShouldContainOnly<T>(this IEnumerable<T> list, params T[] items)
public static void ShouldContainOnly<T>(this IEnumerable<T> list, params Func<T, bool>[] whereClauses)
public static void ShouldContainOnlyInSameOrder<T>(this IEnumerable<T> list, params T[] items)

Download

699
by joeybeninghove
Jan 16, 2008
8:15 PM

Applied

Just a quick patch to add some generics goodness to the NUnit type extensions.

Thanks,
Joey


Applied Jul 8, 2011: applied eons ago.

Download

3687
by campbell
Aug 25, 2009
8:48 PM

Applied

The following patch addresses a performance issue with the action step implementation of the NBehave framework.

The problem is due to excessive backtracking with the current regular expression being generated to match the action steps. The problem is exasperated further when the action steps themselves are worded similarly. In some cases, we experienced matching times exceeding 45 seconds per action step.

The uploaded file contains a patch for the “ActionStepConverterExtensions” class and a test fixture that demonstrates the problem.

For good measure, we also added the ability to match punctuation characters within the action step parameters as we are currently using the framework to match addresses.

For example we need to match values like the following:

34 Wood Grove Ave. SW, Calgary


Don & Anne


Applied Jul 8, 2011: fix applied long ago.

Download

697
by joeybeninghove
Jan 16, 2008
7:21 PM

Applied

Ok guys, so after much toiling over getting the patch file generated correctly, here ya go.

Here are some things to note:

* 2 new projects under the NBehave.Runner solution folder (NBehave.NAnt and NBehave.NAnt.Tests)
* I wanted to re-use some of the existing classes that were used only in the console runner so I refactored those out and put them in the Narrator project
o NBehave.Narrator.Framework.EventListeners folder (with various implementations of event listeners)
o NBehave.Narrator.Framework.PlainTextOutput.cs (formerly ConsoleOutput, but refactored to take a TextWriter to invert the dependency on what it writes to)
* After these refactoring I marked the old classes in the console project as Obsolete (pending your review, you can update the references to them and delete them)
* I updated the main NBehave.build script to include the NBehave.NAnt.Tests project when running the test targets
* Oh, I also updated the nunit.framework.dll and Rhino.Mocks.dll assemblies in the lib folder (included in the attached zip file)
o There was an inconsistency between the version of the nunit.framework.dll in the "lib" folder vs. the "tools" folder which is now cleaned up
o Took the liberty to update Rhino Mocks, 'cause I've grown used to the new Expect.Call(delegate { mock.DoSomething(); }) notation which wasn't in the version of Rhino Mocks being used by NBehave... :D

Anywho, attached is a zip file containing the patch file along with the updated assemblies for the lib folder (since those couldn't be included in the patch). I've tested the patch locally against a clean get of the current repository.

So just a couple simple steps should do the trick:

1. Apply the .patch file to the trunk
2. Copy the 2 updated assemblies into the lib folder
3. Run "go test" and all should be good.

Let me know if you have any problems.

Thanks,
Joey


Applied Jul 8, 2011: applied, long ago.

Download

9751
by palazkov
Jun 20, 2011
7:57 PM

Applied

Here is a small extension for NBehave which allows to integrate text scenarios into any possible C# xunit frameworks.

For example:

[TestFixture]
public class WhenClassWithTextScenarioHasExternallyProvidedActionSteps
{
[Test]
public void ShouldRecognizeExternalActionSteps()
{
@"Given something
When happens something
Then profit".Execute(
In.Context<GivenActionStep>().And<WhenActionStep>().And<ThenActionStep>());
}
}

[ActionSteps]
public class GivenActionStep
{
[Given("something")]
public void StepImplementation()
{
}
}

[ActionSteps]
public class WhenActionStep
{
[When("happens something")]
public void StepImplementation()
{
}
}

[ActionSteps]
public class ThenActionStep
{
[Then("profit")]
public void StepImplementation()
{
}
}


Applied Jul 8, 2011: applied. although I wish there where some tests.

13705

Download

372
by makka
Oct 11, 2007
7:17 PM

Declined

To get this patch working you need to :
Create a post build action that copy NBehave assemblies inside
C:\Program Files\TestDriven.NET 2.0\NBehave\

Create a registry key whit these values :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\NBehave]
"Application"="C:\\Program Files\\TestDriven.NET 2.0\\NBehave\\NBehave-Console.exe"
"AssemblyPath"="C:\\Program Files\\TestDriven.NET 2.0\\NBehave\\NBehave.AddIn.dll"
"TargetFrameworkAssemblyName"="NBehave.Framework"
"TypeName"="NBehave.AddIn.NBehaveTestRunner"
@="30"

edit the file TestDriven.dll.config located in %PROGRAMFILE%\TestDriven.NET 2.0 and add some new node

<icon name="NBehave" file="icons\Runtime.bmp"/>
under
<icons> section

<button command="ApplicationNBehave" />
in the same section that contains
<button command="ApplicationMbUnit" />

<command name="ApplicationNBehave" applicationName="NBehave" handler="TestDriven.Services.Commands.GuiApplicationHandler, TestDriven.Services" icon="NBehave" buttonText="NBehave" tooltip="Start NBehave application" />
in the same section that contains
<command name="ApplicationMbUnit" applicationName="MbUnit" handler="TestDriven.Services.Commands.GuiApplicationHandler, TestDriven.Services" icon="MbUnit" buttonText="MbUnit" tooltip="Start MbUnit application" />

Sorry but creating this patch with CodePlexClient is not very easy
If you need to help to apply do not hesitate to contact me using my blog:
http://blogs.ugidotnet.org/makka


Declined Jul 8, 2011: Too bad codeplex dont notify you when patches are uploaded :-(

1520
4308
by giancarloorru
Nov 3, 2009
2:59 PM

Declined

Hi.
This is my second attempt to allow plain text scenario execution integration in VS.
Things seems to work within TestDriven.

Thanks
giancarlo


Declined Jul 8, 2011: TestDriven.net integration was already in nbehave when this patch was submitted (I think)

4238
by giancarloorru
Oct 27, 2009
9:57 AM

Declined

Hi.
This is my first attempt to allow plain text scenario execution integration in VS.
I implemented 2 kind of test: one using a real assembly and the second trying to mock Assembly class. As I seen that it isn't possible a made a refactoring substituting Assembly with _assembly (that is an interface).
Things seems to work within TestDriven.

Thanks
giancarlo
giancarlo.orruATgmail.com


Declined Jul 8, 2011: I _think_ similar funktionality exists.

3329
by krugs525
Jul 15, 2009
3:01 PM

Declined

Made CreateStub() and CreateDependency() virtual on SpecBase.


Declined Jul 8, 2011: .

1120
by simone_b
Apr 17, 2008
10:06 PM

Declined

Hi guys, I have been using NBehave extensively in my projects lately and I wanted to upload a patch with some additions and changes which I did to adapt it to my needs.

First, the various xxxSpecBase classes shouldn't have the TestFixture attribute, since I should be able to create an abstract base specification class on top of them and not see my test in the abstract class marked as ignored (I've discussed this with Charlie from NUnit and he said he would contact you about this issue).

Then, I made visible in the SpecBase class the AutomockingContainer Mark<> method, since at times I want to override the default mocking strategy for the components the container creates. I wrote tests to cover this.

Let me know what you think. Anyway, I would like to contribute to the project if you like.


Declined Jul 8, 2011: Is this reply late or what :( The automocking container is out and removing [TestFixture] from the base class will break alot of tests (at least mine).

View All