.NET API
RunJudgeContract
Tracon.Testing.Contracts.Xunit.dllBehavior tests for an IRunJudge implementation.
public abstract class RunJudgeContract : IAsyncLifetime, IAsyncDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”IAsyncLifetime, IAsyncDisposable
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”RunJudgeContract()
Section titled “ RunJudgeContract()”protected RunJudgeContract()Properties
Section titled “Properties”ConcurrentCallCount
Section titled “ ConcurrentCallCount”Gets the number of calls used by the deterministic concurrency probe.
protected virtual int ConcurrentCallCount { get; }Property Value
Section titled “Property Value”The judge under test.
protected IRunJudge Judge { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”A_pre_cancelled_token_is_honored()
Section titled “ A_pre_cancelled_token_is_honored()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/Judges/RunJudgeContract.cs", 144)]public Task A_pre_cancelled_token_is_honored()Returns
Section titled “Returns”Concurrent_calls_start_together_and_complete()
Section titled “ Concurrent_calls_start_together_and_complete()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/Judges/RunJudgeContract.cs", 117)]public Task Concurrent_calls_start_together_and_complete()Returns
Section titled “Returns”CreateContext()
Section titled “ CreateContext()”Creates a normal completed-run context.
protected virtual RunJudgeContext CreateContext()Returns
Section titled “Returns”CreateJudgeAsync()
Section titled “ CreateJudgeAsync()”Creates the judge under test.
protected abstract ValueTask<IRunJudge> CreateJudgeAsync()Returns
Section titled “Returns”DisposeAsync()
Section titled “ DisposeAsync()”public ValueTask DisposeAsync()Returns
Section titled “Returns”Every_score_in_a_judgment_can_be_stored()
Section titled “ Every_score_in_a_judgment_can_be_stored()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/Judges/RunJudgeContract.cs", 52)]public Task Every_score_in_a_judgment_can_be_stored()Returns
Section titled “Returns”InitializeAsync()
Section titled “ InitializeAsync()”Called immediately after the class has been created, before it is used.
public ValueTask InitializeAsync()Returns
Section titled “Returns”Name_is_a_stable_valid_identifier_across_calls()
Section titled “ Name_is_a_stable_valid_identifier_across_calls()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/Judges/RunJudgeContract.cs", 39)]public Task Name_is_a_stable_valid_identifier_across_calls()Returns
Section titled “Returns”Repeated_calls_with_the_same_context_complete()
Section titled “ Repeated_calls_with_the_same_context_complete()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/Judges/RunJudgeContract.cs", 133)]public Task Repeated_calls_with_the_same_context_complete()Returns
Section titled “Returns”ShouldBeStorable(RunJudgment)
Section titled “ ShouldBeStorable(RunJudgment)”Asserts that every score in a judgment satisfies the stored invariants.
protected static void ShouldBeStorable(RunJudgment judgment)Parameters
Section titled “Parameters”judgment RunJudgment
The judgment under test.
Remarks
Section titled “Remarks”An empty judgment passes: it says the judge reached no decision, and nothing is written. What must never happen is a judgment that Tracon then refuses to store — a repeated name, an out-of-range value, or a value shape that does not match its kind.
Whitespace_output_and_empty_tools_do_not_throw()
Section titled “ Whitespace_output_and_empty_tools_do_not_throw()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/Judges/RunJudgeContract.cs", 110)]public Task Whitespace_output_and_empty_tools_do_not_throw()