.NET API
WorkflowCheckpointStoreContract
Tracon.Testing.Contracts.Xunit.dllBehavior tests for the IWorkflowCheckpointStore contract.
public abstract class WorkflowCheckpointStoreContract : TenantIsolationContract<IWorkflowCheckpointStore>, IAsyncLifetime, IAsyncDisposableInheritance
Section titled “Inheritance”object ← TenantIsolationContract<IWorkflowCheckpointStore> ← WorkflowCheckpointStoreContract
Implements
Section titled “Implements”IAsyncLifetime, IAsyncDisposable
Inherited Members
Section titled “Inherited Members”TenantIsolationContract<IWorkflowCheckpointStore>.TenantA, TenantIsolationContract<IWorkflowCheckpointStore>.TenantB, TenantIsolationContract<IWorkflowCheckpointStore>.CreateStoreAsync(), TenantIsolationContract<IWorkflowCheckpointStore>.UseAmbientTenant(MutableTenantContext), TenantIsolationContract<IWorkflowCheckpointStore>.InitializeAsync(), TenantIsolationContract<IWorkflowCheckpointStore>.DisposeAsync(), TenantIsolationContract<IWorkflowCheckpointStore>.OnDisposeAsync(), TenantIsolationContract<IWorkflowCheckpointStore>.SeedAsync(string, string), TenantIsolationContract<IWorkflowCheckpointStore>.ExistsAsync(string, object), TenantIsolationContract<IWorkflowCheckpointStore>.CountAsync(string), TenantIsolationContract<IWorkflowCheckpointStore>.TryDeleteAsync(string, object), TenantIsolationContract<IWorkflowCheckpointStore>.TryOverwriteAsync(string, string), TenantIsolationContract<IWorkflowCheckpointStore>.Tenant_cannot_read_another_tenants_record(), TenantIsolationContract<IWorkflowCheckpointStore>.Tenant_reads_its_own_record(), TenantIsolationContract<IWorkflowCheckpointStore>.Tenant_does_not_see_another_tenants_record_in_the_list(), TenantIsolationContract<IWorkflowCheckpointStore>.Tenant_cannot_delete_another_tenants_record(), TenantIsolationContract<IWorkflowCheckpointStore>.Same_name_lives_independently_across_two_tenants(), TenantIsolationContract<IWorkflowCheckpointStore>.AmbientTenant, TenantIsolationContract<IWorkflowCheckpointStore>.Store, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The most critical scenario is reading back a polymorphic payload
without corruption: the Microsoft Agent Framework checkpoint JSON
carries a $type discriminator that must be the first property of
the object it appears in. A store that reorders object keys on write can
silently take the discriminator out of first place, so a compliant
implementation must preserve key order.
Constructors
Section titled “Constructors”WorkflowCheckpointStoreContract()
Section titled “ WorkflowCheckpointStoreContract()”protected WorkflowCheckpointStoreContract()Methods
Section titled “Methods”A_checkpoint_written_without_version_stamps_lists_back_null()
Section titled “ A_checkpoint_written_without_version_stamps_lists_back_null()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 211)]public Task A_checkpoint_written_without_version_stamps_lists_back_null()Returns
Section titled “Returns”Another_tenants_checkpoint_is_NOT_FOUND()
Section titled “ Another_tenants_checkpoint_is_NOT_FOUND()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 103)]public Task Another_tenants_checkpoint_is_NOT_FOUND()Returns
Section titled “Returns”CountAsync(string)
Section titled “ CountAsync(string)”Reports how many records the given tenant sees through the listing endpoint.
protected override ValueTask<int> CountAsync(string tenantId)Parameters
Section titled “Parameters”tenantId string
The reading tenant.
Returns
Section titled “Returns”The number of records seen.
Delete_clears_the_entire_session()
Section titled “ Delete_clears_the_entire_session()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 176)]public Task Delete_clears_the_entire_session()Returns
Section titled “Returns”ExistsAsync(string, object)
Section titled “ ExistsAsync(string, object)”Reports whether the record is visible from the given tenant’s viewpoint.
protected override ValueTask<bool> ExistsAsync(string tenantId, object key)Parameters
Section titled “Parameters”tenantId string
The reading tenant.
key object
The key returned by TenantIsolationContract.SeedAsync.
Returns
Section titled “Returns”true if the record is visible.
Listing_by_run_filters_correctly()
Section titled “ Listing_by_run_filters_correctly()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 152)]public Task Listing_by_run_filters_correctly()Returns
Section titled “Returns”Listing_does_NOT_CARRY_the_state_payload()
Section titled “ Listing_does_NOT_CARRY_the_state_payload()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 140)]public Task Listing_does_NOT_CARRY_the_state_payload()Returns
Section titled “Returns”Listing_preserves_creation_order()
Section titled “ Listing_preserves_creation_order()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 117)]public Task Listing_preserves_creation_order()Returns
Section titled “Returns”Nonexistent_checkpoint_returns_null()
Section titled “ Nonexistent_checkpoint_returns_null()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 188)]public Task Nonexistent_checkpoint_returns_null()Returns
Section titled “Returns”Polymorphic_payload_is_read_back_with_KEY_ORDER_PRESERVED()
Section titled “ Polymorphic_payload_is_read_back_with_KEY_ORDER_PRESERVED()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 58)]public Task Polymorphic_payload_is_read_back_with_KEY_ORDER_PRESERVED()Returns
Section titled “Returns”SeedAsync(string, string)
Section titled “ SeedAsync(string, string)”Writes a sample record for the given tenant.
protected override ValueTask<object> SeedAsync(string tenantId, string name)Parameters
Section titled “Parameters”tenantId string
The tenant that owns the record.
name string
The name distinguishing the record. The same name may be used by two tenants.
Returns
Section titled “Returns”The key to use for reading the record back.
StateSchemaVersion_and_StateMafVersion_round_trip_through_listing_metadata()
Section titled “ StateSchemaVersion_and_StateMafVersion_round_trip_through_listing_metadata()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 192)]public Task StateSchemaVersion_and_StateMafVersion_round_trip_through_listing_metadata()Returns
Section titled “Returns”TryDeleteAsync(string, object)
Section titled “ TryDeleteAsync(string, object)”Attempts to delete the record on behalf of the given tenant.
protected override ValueTask<bool?> TryDeleteAsync(string tenantId, object key)Parameters
Section titled “Parameters”tenantId string
The tenant attempting the delete.
key object
The key returned by TenantIsolationContract.SeedAsync.
Returns
Section titled “Returns”true if the delete succeeded, false if the record was not found; null if the store does not offer deletion.
Written_checkpoint_is_read_back()
Section titled “ Written_checkpoint_is_read_back()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WorkflowCheckpointStoreContract.cs", 47)]public Task Written_checkpoint_is_read_back()