All Projects → fulls1z3 → xunit-orderer

fulls1z3 / xunit-orderer

Licence: MIT license
Implementation of ITestCaseOrderer enforcing xUnit to run the facts in strict order

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to xunit-orderer

taxjar.net
Sales Tax API Client for .NET / C#
Stars: ✭ 21 (+40%)
Mutual labels:  dot-net
Discord-Bot
Discord C#/.NET Bot
Stars: ✭ 43 (+186.67%)
Mutual labels:  dot-net
arcade-pcb-case
Plans to build Arcade PCB cases
Stars: ✭ 29 (+93.33%)
Mutual labels:  case
Inquirer.cs
A collection of common interactive command line user interfaces. Port of Inquirer.js
Stars: ✭ 26 (+73.33%)
Mutual labels:  dot-net
net-EmailAddress
Multiple implementations on email address validation.
Stars: ✭ 12 (-20%)
Mutual labels:  dot-net
match-casing
Match the case of `value` to that of `base`
Stars: ✭ 13 (-13.33%)
Mutual labels:  case
ArchitectNow.ApiStarter
Sample ASP.NET Core 2 API Setup used by ArchitectNow for corresponding workshop presentations
Stars: ✭ 35 (+133.33%)
Mutual labels:  xunit
Odapter
C# code generator for Oracle packages
Stars: ✭ 16 (+6.67%)
Mutual labels:  dot-net
testcontainers-dotnet
dotnet port of testcontainers-java
Stars: ✭ 22 (+46.67%)
Mutual labels:  xunit
contoso-university
Contoso University demo using asp net core and related technologies
Stars: ✭ 42 (+180%)
Mutual labels:  xunit
Unofficial-Bitcointalk-API
Unofficial C# / .NET library for fetching Bitcointalk.org boards, topics and posts
Stars: ✭ 16 (+6.67%)
Mutual labels:  dot-net
asciidocnet
AsciiDoc Processor for .NET
Stars: ✭ 33 (+120%)
Mutual labels:  dot-net
net-Socket
A minimalist wrapper around System.Net.Sockets.Socket.
Stars: ✭ 21 (+40%)
Mutual labels:  dot-net
raml-dotnet-parser-2
No description or website provided.
Stars: ✭ 17 (+13.33%)
Mutual labels:  dot-net
SwitchCaseGenerator
An Xcode Source Editor Extension that generates a swift switch case statement based on selected enum cases
Stars: ✭ 63 (+320%)
Mutual labels:  case
FakeItEasy.AutoFakeIt
A very simple, yet flexible, "AutoFaker" for FakeItEasy to easily auto generate classes with faked dependencies.
Stars: ✭ 15 (+0%)
Mutual labels:  xunit
Xunit.Categories
Friendlier attributes to help categorize your tests
Stars: ✭ 85 (+466.67%)
Mutual labels:  xunit
DnsTube
Access your computer from anywhere. DnsTube is a Windows .NET dynamic DNS client for Cloudflare.
Stars: ✭ 137 (+813.33%)
Mutual labels:  dot-net
iisexpress-testkit
IIS Express TestKit
Stars: ✭ 13 (-13.33%)
Mutual labels:  xunit
test-class
Test::Class - an xUnit testing framework for Perl 5.x
Stars: ✭ 18 (+20%)
Mutual labels:  xunit

xUnit Orderer

Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.

xUnit Orderer is an implementation of ITestCaseOrderer enforcing xUnit to run the facts in strict order.

There're some scenarios that you might need to chain the facts to be evaluated in a strict order. This project implements the ITestCaseOrderer interface of xUnit and provides the TestPriority decorator to perform the test case ordering.

Check out the example below for details.

Prerequisites

Packages in this project depend on

Older versions contain outdated dependencies, might produce errors.

Getting started

Installation

You can install xUnit Orderer by running following commands in the Package Manager Console

Install-Package XunitOrderer

Usage

AssemblyInfo.cs

using System.Reflection;
using System.Runtime.InteropServices;
using Xunit;

...

[assembly:CollectionBehavior(DisableTestParallelization = true)]
[assembly:TestCollectionOrderer("XunitOrderer.TestCollectionOrderer", "XunitOrderer.Testing")]

TestClass1.cs

[TestPriority(10)]
public class TestClass1 : TestClassBase
{
    [Fact]
    [TestPriority(101)]
    public void First()
    {
        Assert.Equal(1, 1);
    }
 
    [Fact]
    [TestPriority(102)]
    public void Second()
    {
        Assert.Equal(2, 2);
    }
}

TestClass2.cs

[TestPriority(20)]
public class TestClass2 : TestClassBase
{
    [Fact]
    [TestPriority(103)]
    public void Third()
    {
        Assert.Equal(3, 3);
    }
 
    [Fact]
    [TestPriority(104)]
    public void Fourth()
    {
        Assert.Equal(4, 4);
    }
}

The execution order of the facts are:

  • TestClass1 -> First
  • TestClass1 -> Second
  • TestClass2 -> Third
  • TestClass2 -> Fourth

Built with .NET Framework v4.6.2, solution currently supports xUnit v2.2.0.

Contributing

If you want to file a bug, contribute some code, or improve documentation, please read up on the following contribution guidelines:

License

The MIT License (MIT)

Copyright (c) 2017 Burak Tasci

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].