Skip to content

Commit

Permalink
Merge pull request #1 from nullean/fix/readme
Browse files Browse the repository at this point in the history
move logo up
  • Loading branch information
Mpdreamz authored Feb 9, 2024
2 parents 34a546e + 0112dcc commit 9c7a2f6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions readme.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<a href="https://www.nuget.org/packages/Nullean.Xunit.Partitions/"><img src="https://img.shields.io/nuget/v/Nullean.Xunit.Partitions?color=blue&style=plastic" /></a>

<img src="https://github.com/nullean/xunit-partitions/raw/main/nuget-icon.png" align="right"
title="Logo " width="220" height="220">

An `XunitTestFramework` implementation that introduces the concept of "partitions".

A `IPartitionFixture{TLifetime}` allows tests to inject a long lived object to share.
Expand All @@ -16,8 +19,7 @@ In fact each `IPartitionFixture{TLifetime}` can declare its own desired concurre
If you want to share a few (say 0-20) long running objects over 1000's of tests this library will work for you.
If you instead have many test collections each with only a few tests xUnit native collections will suit better.

<img src="https://github.com/nullean/xunit-partitions/raw/main/nuget-icon.png" align="right"
title="Logo " width="220" height="220">
Because each partititon only calls `InitializeAsync` and `DisposeAsync` just before and after its test will run this makes it more appropiate then assembly fixtures which might bootstrap too early and dispose too late.

## Setup

Expand Down Expand Up @@ -121,6 +123,8 @@ public class SharedState2Class(LongLivedObject longLivedObject) : IPartitionFixt
`SharedState1Class` and `SharedState2Class` both depend on `LongLivedObject` and so will receive a single shared
instance AFTER `InitializeAsync` has run. The tests of each **will** run concurrently.

`DisposeAsync` will run before the next partition's state will `InitializeAsync`


`NoStateClass` does not belong to any partition. All tests with no partitions are treated as part of an empty partition.
These tests will all run concurrently too.
Expand Down
4 changes: 2 additions & 2 deletions build/scripts/Paths.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module Paths
open System
open System.IO

let ToolName = "proc"
let Repository = sprintf "nullean/%s" ToolName
let ToolName = "Nullean.Xunit.Partitions"
let Repository = "nullean/xunit-partitions"
let MainTFM = "netstandard2.0"
let SignKey = "96c599bbe3e70f5d"

Expand Down
3 changes: 2 additions & 1 deletion build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ let private generateApiChanges (arguments:ParseResults<Arguments>) =
let output = Paths.RootRelative <| Paths.Output.FullName
let currentVersion = currentVersion.Value
let nugetPackages =
Paths.Output.GetFiles("*.nupkg") |> Seq.sortByDescending(fun f -> f.CreationTimeUtc)
Paths.Output.GetFiles("*.nupkg") |> Seq.sortByDescending(_.CreationTimeUtc)
|> Seq.map (fun p -> Path.GetFileNameWithoutExtension(Paths.RootRelative p.FullName).Replace("." + currentVersion, ""))
nugetPackages
|> Seq.iter(fun p ->
printfn "(%s) -> (%s)" p currentVersion
let outputFile =
let f = sprintf "breaking-changes-%s.md" p
Path.Combine(output, f)
Expand Down

0 comments on commit 9c7a2f6

Please sign in to comment.