Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Conjecture.Xunit.V3/Internal/PropertyTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public async ValueTask<RunSummary> Run(
IReadOnlyDictionary<string, IReadOnlyCollection<string>> traits =
Traits.ToDictionary(kvp => kvp.Key, kvp => (IReadOnlyCollection<string>)kvp.Value.ToList());

XunitTest test = new(this, TestMethod, null, null, TestCaseDisplayName, 0, traits, null, Array.Empty<object?>());
XunitTest test = new(this, TestMethod, null, null, null, null, null, TestCaseDisplayName, 0, traits, null, Array.Empty<object?>());

string assemblyID = TestMethod.TestClass.TestCollection.TestAssembly.UniqueID;
string collectionID = TestMethod.TestClass.TestCollection.UniqueID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ValueTask<IReadOnlyCollection<IXunitTestCase>> Discover(
int maxStrategyRejections = attr.MaxStrategyRejections > 0 ? attr.MaxStrategyRejections : 5;
int deadlineMs = attr.DeadlineMs;

string displayName = testMethod.GetDisplayName(attr.DisplayName ?? testMethod.Method.Name, null, null);
string displayName = testMethod.GetDisplayName(attr.DisplayName ?? testMethod.Method.Name, null, null, null);
string uniqueID = testMethod.UniqueID;

IReadOnlyCollection<IXunitTestCase> testCases = [new PropertyTestCase(
Expand Down
5 changes: 4 additions & 1 deletion src/Conjecture.Xunit.V3/PropertyAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2026 Kim Ommundsen. Licensed under the MPL-2.0.
// See LICENSE.txt in the project root or https://mozilla.org/MPL/2.0/

using System.Runtime.CompilerServices;
using Xunit;
using Xunit.v3;

Expand All @@ -9,7 +10,9 @@ namespace Conjecture.Xunit.V3;
/// <summary>Marks a method as a Conjecture property-based test (xUnit v3).</summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
[XunitTestCaseDiscovererAttribute(typeof(Internal.PropertyTestCaseDiscoverer))]
public sealed class PropertyAttribute : FactAttribute
public sealed class PropertyAttribute(
[CallerFilePath] string? sourceFilePath = null,
[CallerLineNumber] int sourceLineNumber = -1) : FactAttribute(sourceFilePath, sourceLineNumber)
{
/// <summary>Maximum number of examples to generate. Defaults to 100.</summary>
public int MaxExamples { get; set; } = 100;
Expand Down
2 changes: 1 addition & 1 deletion src/Conjecture.Xunit.V3/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#nullable enable
Conjecture.Xunit.V3.PropertyAttribute
Conjecture.Xunit.V3.PropertyAttribute.PropertyAttribute() -> void
Conjecture.Xunit.V3.PropertyAttribute.PropertyAttribute(string? sourceFilePath = null, int sourceLineNumber = -1) -> void
Conjecture.Xunit.V3.PropertyAttribute.MaxExamples.get -> int
Conjecture.Xunit.V3.PropertyAttribute.MaxExamples.set -> void
Conjecture.Xunit.V3.PropertyAttribute.Seed.get -> ulong
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.3.0" />

<!-- xUnit v3 -->
<PackageVersion Include="xunit.v3" Version="2.0.1" />
<PackageVersion Include="xunit.v3.extensibility.core" Version="2.0.1" />
<PackageVersion Include="xunit.v3" Version="3.2.2" />
<PackageVersion Include="xunit.v3.extensibility.core" Version="3.2.2" />

<!-- NUnit -->
<PackageVersion Include="NUnit" Version="4.5.1" />
Expand Down