Skip to content
Tracon

RunJudgeContract

Namespace Tracon.Testing.Contracts.Judges · Assembly Tracon.Testing.Contracts.Xunit.dll

Behavior tests for an IRunJudge implementation.

public abstract class RunJudgeContract : IAsyncLifetime, IAsyncDisposable

objectRunJudgeContract

IAsyncLifetime, IAsyncDisposable

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

protected RunJudgeContract()

Gets the number of calls used by the deterministic concurrency probe.

protected virtual int ConcurrentCallCount { get; }

int

The judge under test.

protected IRunJudge Judge { get; }

IRunJudge

[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/Judges/RunJudgeContract.cs", 144)]
public Task A_pre_cancelled_token_is_honored()

Task

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()

Task

Creates a normal completed-run context.

protected virtual RunJudgeContext CreateContext()

RunJudgeContext

Creates the judge under test.

protected abstract ValueTask<IRunJudge> CreateJudgeAsync()

ValueTask<IRunJudge>

public ValueTask DisposeAsync()

ValueTask

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()

Task

Called immediately after the class has been created, before it is used.

public ValueTask InitializeAsync()

ValueTask

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()

Task

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()

Task

Asserts that every score in a judgment satisfies the stored invariants.

protected static void ShouldBeStorable(RunJudgment judgment)

judgment RunJudgment

The judgment under test.

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()

Task