Skip to content

Releases: LeapingGorillaLTD/Testing

Leaping Gorilla Testing v6.0.1 - Composable Test Updates

23 Sep 11:28
de7e586
Compare
Choose a tag to compare

This release adds some fixes to the composable test code. Hat tip to @dolbz for his work on this major feature.

Leaping Gorilla Testing v6.0.0 - Composable Tests

08 Sep 16:25
f00f3f2
Compare
Choose a tag to compare

Composable BDD tests is a new addition to LeapingGorilla.Testing to attempt to address some issues that can arise as test complexity increases.

To share test setup and assertion code when using LeapingGorilla.Testing it is normal to use inheritance to achieve this. This works to a point but can get complex as more shared code is added. This typically ends up with a choice between copying and pasting a subset of the [Given] and [Then] methods or building increasingly complex type hierarchies with virtual methods and special case overrides.

Composable Tests tackles this with a fluent interface allowing composition of your common test building blocks into a full test. An example may look like:

Example ComposeTest() implementation:

protected override ComposedTest ComposeTest() => 
    TestComposer
        .Given(SomeSetupIsPerformed)
        .And(SomeMoreSetupIsPerformed)
        .When(TheThingIsDone)
        .Then(CheckTheThingWasCorrect)
        .And(AnotherThingWasCorrect);

The composable test pattern can be used alongside all existing LeapingGorilla.Testing features. Read More in the Wiki

Leaping Gorilla Testing v5.0.0 - .Net6 Support

21 Jun 12:53
cbb09b7
Compare
Choose a tag to compare

Net 6.0 Support

With .Net 5 seeing EOL on support on May 10th 2022, we have officially transitioned into targeting .Net 6. We still dual-target NetStandard2.0 for framework support back to 4.6.1 and .Net Core 2.0.

Package Upgrades

We have bumped NSubstitute to v4.3.0. This brought a change to how the logic around constructors works which should be accounted for but please let us know if you see any issues. This could be a breaking change if you extend WhenTestingTheBehaviourOfBase.

We have also tidied up the packaging scripts, cleaned up some vestigial code and sorted a few documentation comments.

Package Versions in This Release

Testing Packages

Testing packages provide either specific test framework support or are the preferred way of mocking/substitution used under the covers in the library.

Support Packages

Support packages are used in the Core project to provide fast reflection (to keep overhead to a minimum) and are required to support the underpinnings of the library.

Leaping Gorilla Testing v4.3.1 - XUnit Support

25 Aug 09:53
151602d
Compare
Choose a tag to compare

XUnit support

LeapingGorilla.Testing now fully supports XUnit as the base test framework. Usage remains exactly the same as with NUnit but your Assertions now follow the XUnit patterns. Take a look at the XUnit.Tests project for practical examples - yes, we test the library using itself. Install using nuget with:

install-package LeapingGorilla.Testing.XUnit

Package Upgrades

We have bumped our referenced packages to their latest versions:

Testing Packages

Testing packages provide either specific test framework support or are the preferred way of mocking/substitution used under the covers in the library.

Support Packages

Support packages are used in the Core project to provide fast reflection (to keep overhead to a minimum) and are required to support the underpinnings of the library.

Leaping Gorilla Testing 4.2.17

08 May 11:46
63ce2af
Compare
Choose a tag to compare

Given methods may now have a return type of Task and may optionally be decorated with the async keyword. This means you can more easily call async methods in your setup code. This is particularly useful when writing integration tests. Hat tip to @brianfeucht for the feature request.

Leaping Gorilla Testing 4.2.15

17 Apr 16:10
50d8fb5
Compare
Choose a tag to compare

The When attribute is used to specify the entry point for your test and marks the method which will be executed by the LeapingGorilla.Testing library. This release adds an optional parameter to the When attribute:

  • DoNotRethrowExceptions.

Any exceptions that occur during execution of your When method will be unwrapped and stored in the ThrownException property. You can then Assert against the ThrownException property in your tests to ensure that an Exception did (or did not) occur.

Additionally if DoNotRethrowExceptions is set to true then the exception will not be rethrown - it will just be swallowed meaning no need for you to wrap your statements in the When method with a try/catch

Leaping Gorilla Testing v4.1.0

31 Jan 23:01
bf76e63
Compare
Choose a tag to compare
  • Support for an [ItemUnderTest] to be automatically created using internal constructors (PR #2)
  • Tidy up build scripts