.NET API
WebhookStoreContract
Tracon.Testing.Contracts.Xunit.dllBehavior tests for the IWebhookStore contract.
public abstract class WebhookStoreContract : TenantIsolationContract<IWebhookStore>, IAsyncLifetime, IAsyncDisposableInheritance
Section titled “Inheritance”object ← TenantIsolationContract<IWebhookStore> ← WebhookStoreContract
Implements
Section titled “Implements”IAsyncLifetime, IAsyncDisposable
Inherited Members
Section titled “Inherited Members”TenantIsolationContract<IWebhookStore>.TenantA, TenantIsolationContract<IWebhookStore>.TenantB, TenantIsolationContract<IWebhookStore>.CreateStoreAsync(), TenantIsolationContract<IWebhookStore>.UseAmbientTenant(MutableTenantContext), TenantIsolationContract<IWebhookStore>.InitializeAsync(), TenantIsolationContract<IWebhookStore>.DisposeAsync(), TenantIsolationContract<IWebhookStore>.OnDisposeAsync(), TenantIsolationContract<IWebhookStore>.SeedAsync(string, string), TenantIsolationContract<IWebhookStore>.ExistsAsync(string, object), TenantIsolationContract<IWebhookStore>.CountAsync(string), TenantIsolationContract<IWebhookStore>.TryDeleteAsync(string, object), TenantIsolationContract<IWebhookStore>.TryOverwriteAsync(string, string), TenantIsolationContract<IWebhookStore>.Tenant_cannot_read_another_tenants_record(), TenantIsolationContract<IWebhookStore>.Tenant_reads_its_own_record(), TenantIsolationContract<IWebhookStore>.Tenant_does_not_see_another_tenants_record_in_the_list(), TenantIsolationContract<IWebhookStore>.Tenant_cannot_delete_another_tenants_record(), TenantIsolationContract<IWebhookStore>.Same_name_lives_independently_across_two_tenants(), TenantIsolationContract<IWebhookStore>.AmbientTenant, TenantIsolationContract<IWebhookStore>.Store, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”This contract has no secret field. The store only carries the name of the configuration key the secret is read from; tests verify this.
Constructors
Section titled “Constructors”WebhookStoreContract()
Section titled “ WebhookStoreContract()”protected WebhookStoreContract()Methods
Section titled “Methods”Another_tenants_subscription_is_not_visible()
Section titled “ Another_tenants_subscription_is_not_visible()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 135)]public Task Another_tenants_subscription_is_not_visible()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.
Deleted_subscription_is_not_read_back()
Section titled “ Deleted_subscription_is_not_read_back()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 145)]public Task Deleted_subscription_is_not_read_back()Returns
Section titled “Returns”Deleting_a_subscription_also_deletes_its_deliveries()
Section titled “ Deleting_a_subscription_also_deletes_its_deliveries()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 154)]public Task Deleting_a_subscription_also_deletes_its_deliveries()Returns
Section titled “Returns”Deliveries_are_filtered_by_status()
Section titled “ Deliveries_are_filtered_by_status()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 230)]public Task Deliveries_are_filtered_by_status()Returns
Section titled “Returns”Delivery_record_is_read_back()
Section titled “ Delivery_record_is_read_back()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 167)]public Task Delivery_record_is_read_back()Returns
Section titled “Returns”Disabled_subscription_does_not_appear_in_event_search()
Section titled “ Disabled_subscription_does_not_appear_in_event_search()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 114)]public Task Disabled_subscription_does_not_appear_in_event_search()Returns
Section titled “Returns”Event_name_matches_exactly()
Section titled “ Event_name_matches_exactly()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 123)]public Task Event_name_matches_exactly()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.
Failed_delivery_does_not_record_a_delivery_time()
Section titled “ Failed_delivery_does_not_record_a_delivery_time()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 206)]public Task Failed_delivery_does_not_record_a_delivery_time()Returns
Section titled “Returns”Failure_counter_increments_and_disables_the_subscription_at_the_threshold()
Section titled “ Failure_counter_increments_and_disables_the_subscription_at_the_threshold()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 255)]public Task Failure_counter_increments_and_disables_the_subscription_at_the_threshold()Returns
Section titled “Returns”Headers_are_preserved()
Section titled “ Headers_are_preserved()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 71)]public Task Headers_are_preserved()Returns
Section titled “Returns”Saved_subscription_is_read_back()
Section titled “ Saved_subscription_is_read_back()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 55)]public Task Saved_subscription_is_read_back()Returns
Section titled “Returns”Saving_the_same_name_a_second_time_overwrites_it()
Section titled “ Saving_the_same_name_a_second_time_overwrites_it()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 89)]public Task Saving_the_same_name_a_second_time_overwrites_it()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.
Subscribers_for_an_event_are_found()
Section titled “ Subscribers_for_an_event_are_found()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 101)]public Task Subscribers_for_an_event_are_found()Returns
Section titled “Returns”Successful_delivery_resets_the_counter()
Section titled “ Successful_delivery_resets_the_counter()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 276)]public Task Successful_delivery_resets_the_counter()Returns
Section titled “Returns”Successful_delivery_result_is_recorded()
Section titled “ Successful_delivery_result_is_recorded()”[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/WebhookStoreContract.cs", 181)]public Task Successful_delivery_result_is_recorded()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.