Skip to content
Tracon

VoiceSessionStoreContract

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

Behavior tests for the IVoiceSessionStore contract.

public abstract class VoiceSessionStoreContract : TenantIsolationContract<IVoiceSessionStore>, IAsyncLifetime, IAsyncDisposable

objectTenantIsolationContract<IVoiceSessionStore>VoiceSessionStoreContract

IAsyncLifetime, IAsyncDisposable

TenantIsolationContract<IVoiceSessionStore>.TenantA, TenantIsolationContract<IVoiceSessionStore>.TenantB, TenantIsolationContract<IVoiceSessionStore>.CreateStoreAsync(), TenantIsolationContract<IVoiceSessionStore>.UseAmbientTenant(MutableTenantContext), TenantIsolationContract<IVoiceSessionStore>.InitializeAsync(), TenantIsolationContract<IVoiceSessionStore>.DisposeAsync(), TenantIsolationContract<IVoiceSessionStore>.OnDisposeAsync(), TenantIsolationContract<IVoiceSessionStore>.SeedAsync(string, string), TenantIsolationContract<IVoiceSessionStore>.ExistsAsync(string, object), TenantIsolationContract<IVoiceSessionStore>.CountAsync(string), TenantIsolationContract<IVoiceSessionStore>.TryDeleteAsync(string, object), TenantIsolationContract<IVoiceSessionStore>.TryOverwriteAsync(string, string), TenantIsolationContract<IVoiceSessionStore>.Tenant_cannot_read_another_tenants_record(), TenantIsolationContract<IVoiceSessionStore>.Tenant_reads_its_own_record(), TenantIsolationContract<IVoiceSessionStore>.Tenant_does_not_see_another_tenants_record_in_the_list(), TenantIsolationContract<IVoiceSessionStore>.Tenant_cannot_delete_another_tenants_record(), TenantIsolationContract<IVoiceSessionStore>.Same_name_lives_independently_across_two_tenants(), TenantIsolationContract<IVoiceSessionStore>.AmbientTenant, TenantIsolationContract<IVoiceSessionStore>.Store, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The in-memory store and the three SQL providers must pass the same scenarios. Two rules are critical: a second write with the same ID updates the record (a call is first opened, then closed), and input_seconds does not lose its decimal fraction.

protected VoiceSessionStoreContract()
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 177)]
public Task Agent_and_session_filters_work()

Task

[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 167)]
public Task Another_tenants_record_is_not_visible()

Task

Reports how many records the given tenant sees through the listing endpoint.

protected override ValueTask<int> CountAsync(string tenantId)

tenantId string

The reading tenant.

ValueTask<int>

The number of records seen.

Duration_does_NOT_lose_its_decimal_fraction()

Section titled “ Duration_does_NOT_lose_its_decimal_fraction()”
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 53)]
public Task Duration_does_NOT_lose_its_decimal_fraction()

Task

Reports whether the record is visible from the given tenant’s viewpoint.

protected override ValueTask<bool> ExistsAsync(string tenantId, object key)

tenantId string

The reading tenant.

key object

The key returned by TenantIsolationContract.SeedAsync.

ValueTask<bool>

true if the record is visible.

[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 195)]
public Task List_is_ordered_newest_to_oldest()

Task

Live_session_provider_model_and_cost_round_trip()

Section titled “ Live_session_provider_model_and_cost_round_trip()”
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 80)]
public Task Live_session_provider_model_and_cost_round_trip()

Task

Missing_measurement_stays_null_NOT_zero()

Section titled “ Missing_measurement_stays_null_NOT_zero()”
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 66)]
public Task Missing_measurement_stays_null_NOT_zero()

Task

[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 209)]
public Task Paging_is_applied()

Task

[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 35)]
public Task Saved_call_is_read_back()

Task

Second_write_with_the_same_id_UPDATES_the_record()

Section titled “ Second_write_with_the_same_id_UPDATES_the_record()”
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 146)]
public Task Second_write_with_the_same_id_UPDATES_the_record()

Task

Writes a sample record for the given tenant.

protected override ValueTask<object> SeedAsync(string tenantId, string name)

tenantId string

The tenant that owns the record.

name string

The name distinguishing the record. The same name may be used by two tenants.

ValueTask<object>

The key to use for reading the record back.

[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 127)]
public Task The_two_new_end_reasons_round_trip()

Task

Unpriced_live_session_reads_back_with_a_null_cost_NOT_a_zero()

Section titled “ Unpriced_live_session_reads_back_with_a_null_cost_NOT_a_zero()”
[Fact("/Users/farukatasoy/Desktop/projects/Tracon/src/Tracon.Testing.Contracts.Xunit/Contracts/VoiceSessionStoreContract.cs", 108)]
public Task Unpriced_live_session_reads_back_with_a_null_cost_NOT_a_zero()

Task