.NET API
AgentSourceContract
Tracon.Testing.Contracts.Xunit.dllBehavior tests for an IAgentSource implementation.
public abstract class AgentSourceContract : IAsyncLifetime, IAsyncDisposableInheritance
Section titled “Inheritance”Derived
Section titled “Derived”TenantAwareAgentSourceContract, VersionedAgentSourceContract
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”AgentSourceContract()
Section titled “ AgentSourceContract()”protected AgentSourceContract()Properties
Section titled “Properties”KnownAgentName
Section titled “ KnownAgentName”Gets an agent name the source definitely resolves.
protected abstract string KnownAgentName { get; }Property Value
Section titled “Property Value”Source
Section titled “ Source”Gets the source under test.
protected IAgentSource Source { get; }Property Value
Section titled “Property Value”UnknownAgentName
Section titled “ UnknownAgentName”Gets an agent name the source definitely does not resolve.
protected virtual string UnknownAgentName { 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/AgentSources/AgentSourceContract.cs", 122)]public Task A_pre_cancelled_token_is_honored()Returns
Section titled “Returns”CreateSourceAsync()
Section titled “ CreateSourceAsync()”Creates a source ready for use.
protected abstract ValueTask<IAgentSource> CreateSourceAsync()Returns
Section titled “Returns”DisposeAsync()
Section titled “ DisposeAsync()”public ValueTask DisposeAsync()Returns
Section titled “Returns”Every_listed_agent_resolves()
Section titled “ Every_listed_agent_resolves()”Every name IAgentSource.ListAsync reports must resolve.
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 96)]public Task Every_listed_agent_resolves()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”Known_agent_resolves()
Section titled “ Known_agent_resolves()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 89)]public Task Known_agent_resolves()Returns
Section titled “Returns”Listed_descriptors_name_the_source()
Section titled “ Listed_descriptors_name_the_source()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 82)]public Task Listed_descriptors_name_the_source()Returns
Section titled “Returns”Listed_names_are_unique_and_valid()
Section titled “ Listed_names_are_unique_and_valid()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 74)]public Task Listed_names_are_unique_and_valid()Returns
Section titled “Returns”Listing_is_repeatable()
Section titled “ Listing_is_repeatable()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 41)]public Task Listing_is_repeatable()Returns
Section titled “Returns”Listing_is_safe_under_concurrency()
Section titled “ Listing_is_safe_under_concurrency()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 49)]public Task Listing_is_safe_under_concurrency()Returns
Section titled “Returns”Name_is_not_empty()
Section titled “ Name_is_not_empty()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 30)]public void Name_is_not_empty()Priority_is_stable_across_calls()
Section titled “ Priority_is_stable_across_calls()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 33)]public Task Priority_is_stable_across_calls()Returns
Section titled “Returns”Resolution_is_safe_under_concurrency()
Section titled “ Resolution_is_safe_under_concurrency()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 62)]public Task Resolution_is_safe_under_concurrency()Returns
Section titled “Returns”Resolved_agent_is_listed()
Section titled “ Resolved_agent_is_listed()”The other half of the M7 consistency rule (see IAgentSource): a name IAgentSource.ResolveAsync resolves must also appear in IAgentSource.ListAsync. AgentSourceContract.KnownAgentName is guaranteed resolvable by contract (see AgentSourceContract.Known_agent_resolves), so it doubles as the “resolvable name” this direction needs without a dedicated fixture hook.
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 113)]public Task Resolved_agent_is_listed()Returns
Section titled “Returns”Unknown_agent_returns_null()
Section titled “ Unknown_agent_returns_null()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/AgentSources/AgentSourceContract.cs", 92)]public Task Unknown_agent_returns_null()