.NET API
JobScheduleStoreContract
Tracon.Testing.Contracts.Xunit.dllBehavior tests for the IJobScheduleStore contract.
public abstract class JobScheduleStoreContract : TenantIsolationContract<IJobScheduleStore>, IAsyncLifetime, IAsyncDisposableInheritance
Section titled “Inheritance”object ← TenantIsolationContract<IJobScheduleStore> ← JobScheduleStoreContract
Implements
Section titled “Implements”IAsyncLifetime, IAsyncDisposable
Inherited Members
Section titled “Inherited Members”TenantIsolationContract<IJobScheduleStore>.TenantA, TenantIsolationContract<IJobScheduleStore>.TenantB, TenantIsolationContract<IJobScheduleStore>.CreateStoreAsync(), TenantIsolationContract<IJobScheduleStore>.UseAmbientTenant(MutableTenantContext), TenantIsolationContract<IJobScheduleStore>.InitializeAsync(), TenantIsolationContract<IJobScheduleStore>.DisposeAsync(), TenantIsolationContract<IJobScheduleStore>.OnDisposeAsync(), TenantIsolationContract<IJobScheduleStore>.SeedAsync(string, string), TenantIsolationContract<IJobScheduleStore>.ExistsAsync(string, object), TenantIsolationContract<IJobScheduleStore>.CountAsync(string), TenantIsolationContract<IJobScheduleStore>.TryDeleteAsync(string, object), TenantIsolationContract<IJobScheduleStore>.TryOverwriteAsync(string, string), TenantIsolationContract<IJobScheduleStore>.Tenant_cannot_read_another_tenants_record(), TenantIsolationContract<IJobScheduleStore>.Tenant_reads_its_own_record(), TenantIsolationContract<IJobScheduleStore>.Tenant_does_not_see_another_tenants_record_in_the_list(), TenantIsolationContract<IJobScheduleStore>.Tenant_cannot_delete_another_tenants_record(), TenantIsolationContract<IJobScheduleStore>.Same_name_lives_independently_across_two_tenants(), TenantIsolationContract<IJobScheduleStore>.AmbientTenant, TenantIsolationContract<IJobScheduleStore>.Store, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”JobScheduleStoreContract()
Section titled “ JobScheduleStoreContract()”protected JobScheduleStoreContract()Methods
Section titled “Methods”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.
DeleteAsync_removes_an_existing_schedule()
Section titled “ DeleteAsync_removes_an_existing_schedule()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 54)]public Task DeleteAsync_removes_an_existing_schedule()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.
GetAsync_returns_null_for_another_tenant()
Section titled “ GetAsync_returns_null_for_another_tenant()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 46)]public Task GetAsync_returns_null_for_another_tenant()Returns
Section titled “Returns”ListAsync_returns_only_that_tenant()
Section titled “ ListAsync_returns_only_that_tenant()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 63)]public Task ListAsync_returns_only_that_tenant()Returns
Section titled “Returns”ListDueAsync_returns_only_enabled_and_due_schedules()
Section titled “ ListDueAsync_returns_only_enabled_and_due_schedules()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 75)]public Task ListDueAsync_returns_only_enabled_and_due_schedules()Returns
Section titled “Returns”SaveAsync_assigns_an_id_to_a_new_schedule()
Section titled “ SaveAsync_assigns_an_id_to_a_new_schedule()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 26)]public Task SaveAsync_assigns_an_id_to_a_new_schedule()Returns
Section titled “Returns”SaveAsync_keeps_the_id_and_updates_for_the_same_name()
Section titled “ SaveAsync_keeps_the_id_and_updates_for_the_same_name()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 34)]public Task SaveAsync_keeps_the_id_and_updates_for_the_same_name()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.
TryClaimNextRunAsync_a_second_claim_prevents_the_conflict()
Section titled “ TryClaimNextRunAsync_a_second_claim_prevents_the_conflict()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 102)]public Task TryClaimNextRunAsync_a_second_claim_prevents_the_conflict()Returns
Section titled “Returns”TryClaimNextRunAsync_fails_when_the_expected_value_does_not_match()
Section titled “ TryClaimNextRunAsync_fails_when_the_expected_value_does_not_match()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/JobScheduleStoreContract.cs", 90)]public Task TryClaimNextRunAsync_fails_when_the_expected_value_does_not_match()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.