> ## Documentation Index
> Fetch the complete documentation index at: https://klef.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TargetConformance<TConnector>

> Conformance tests on a connector's test tenant.

```csharp
[Collection("ConnectorScenarios")]
public abstract class TargetConformance<TConnector> where TConnector : ITargetConnector, IHasManifest, new()
```

## Constructors

```csharp
protected TargetConformance(LiveTenant tenant, bool overHttp = false)
```

Conformance tests on a connector's test tenant.

### Parameters

**tenant** `LiveTenant` *required*

**overHttp** `bool`

## Properties

**Context** `ConnectionContext` *required*

The tenant's working context.

**Guard** `ConnectorGuard` *required*

The guard writes reach the tenant through.

**None** `CancellationToken` *required*

A token that never cancels.

## Methods

### AccountAsync()

```csharp
protected Task<string> AccountAsync(DesiredPrincipal desired)
```

Creates the account, or finds the one an existing-model vendor already holds.

#### Parameters

**desired** `DesiredPrincipal` *required*

#### Returns

`Task<string>`

### MemberAsync()

```csharp
protected Task<Principal> MemberAsync()
```

Reads and leases the tenant's member.

#### Returns

`Task<Principal>`

### NewAccountAsync()

```csharp
protected Task<DesiredPrincipal> NewAccountAsync()
```

Builds a new account the guard allows.

#### Returns

`Task<DesiredPrincipal>`

### SeedAsync()

```csharp
protected Task SeedAsync()
```

Seeds the tenant and sweeps old runs.

#### Returns

`Task`

### Test\_\_Canonicalize\_\_is\_idempotent\_and\_keeps\_its\_keys\_\_on\_what\_the\_tenant\_holds()

```csharp
[Fact]
public Task Test__Canonicalize__is_idempotent_and_keeps_its_keys__on_what_the_tenant_holds()
```

Checks canonicalizing is idempotent and keeps keys.

#### Returns

`Task`

### Test\_\_ChangeGrants\_\_leaves\_a\_value\_it\_was\_not\_given()

```csharp
[Fact]
public Task Test__ChangeGrants__leaves_a_value_it_was_not_given()
```

Checks a grant change leaves other values.

#### Returns

`Task`

### Test\_\_ChangeGrants\_\_raises\_the\_account\_gone\_\_when\_the\_vendor\_deleted\_it()

```csharp
[Fact]
public Task Test__ChangeGrants__raises_the_account_gone__when_the_vendor_deleted_it()
```

Checks granting to a deleted account raises gone.

#### Returns

`Task`

### Test\_\_ChangeGrants\_\_settles\_\_when\_run\_twice()

```csharp
[Fact]
public Task Test__ChangeGrants__settles__when_run_twice()
```

Checks a grant change settles when run again, with one operation id and with a new one.

#### Returns

`Task`

### Test\_\_ChangeGrants\_\_settles\_on\_a\_principal\_\_when\_run\_twice\_\_and\_the\_principal\_reads\_it()

```csharp
[Fact]
public Task Test__ChangeGrants__settles_on_a_principal__when_run_twice__and_the_principal_reads_it()
```

Checks a grant change on a principal other than the account settles when run again, with one operation id and with a new one, and reads back.

#### Returns

`Task`

### Test\_\_CheckConnection\_\_finds\_no\_blocking\_problem()

```csharp
[Fact]
public Task Test__CheckConnection__finds_no_blocking_problem()
```

Checks the reference tenant's connection has nothing that blocks it.

#### Returns

`Task`

### Test\_\_CreatePrincipal\_\_fails\_with\_the\_account\_existing\_\_when\_run\_twice()

```csharp
[Fact]
public Task Test__CreatePrincipal__fails_with_the_account_existing__when_run_twice()
```

Checks a second create refuses the account the first made.

#### Returns

`Task`

### Test\_\_GetPrincipal\_\_answers\_absent\_\_when\_the\_vendor\_holds\_none()

```csharp
[Fact]
public Task Test__GetPrincipal__answers_absent__when_the_vendor_holds_none()
```

Checks a missing account reads as absent.

#### Returns

`Task`

### Test\_\_InvokeAction\_\_settles\_with\_its\_declared\_returns\_\_when\_run\_twice()

```csharp
[Fact]
public Task Test__InvokeAction__settles_with_its_declared_returns__when_run_twice()
```

Checks each action live tests may run settles with the returns it declares when run twice with one operation id, on the connection, an account, or a principal the tenant names.

#### Returns

`Task`

### Test\_\_ListCatalog\_\_returns\_each\_value\_once\_\_ending\_explicitly\_\_at\_the\_smallest\_page()

```csharp
[Fact]
public Task Test__ListCatalog__returns_each_value_once__ending_explicitly__at_the_smallest_page()
```

Checks each lookup list and each resource fields take values from ends explicitly at the smallest page, never repeating a cursor or a value.

#### Returns

`Task`

### Test\_\_ListChangedPrincipals\_\_returns\_an\_account\_changed\_since\_a\_full\_read\_\_naming\_no\_reference\_\_when\_the\_full\_read\_ends\_with\_a\_watermark()

```csharp
[Fact]
public Task Test__ListChangedPrincipals__returns_an_account_changed_since_a_full_read__naming_no_reference__when_the_full_read_ends_with_a_watermark()
```

Checks a changes-only read returns what changed since a full read that ended with a watermark, ending with a new watermark.

#### Returns

`Task`

### Test\_\_ListGrants\_\_lists\_what\_the\_full\_read\_does\_\_for\_one\_holder\_and\_one\_entitlement()

```csharp
[Fact]
public Task Test__ListGrants__lists_what_the_full_read_does__for_one_holder_and_one_entitlement()
```

Checks a filter on one holder and one entitlement lists what the full read lists of them.

#### Returns

`Task`

### Test\_\_ListGrants\_\_lists\_what\_the\_full\_read\_does\_\_for\_one\_object()

```csharp
[Fact]
public Task Test__ListGrants__lists_what_the_full_read_does__for_one_object()
```

Checks a filter on one object lists what the full read lists on it, at every relation.

#### Returns

`Task`

### Test\_\_ListGrants\_\_restarts\_\_when\_asked\_for\_changes\_it\_has\_no\_watermark\_for()

```csharp
[Fact]
public Task Test__ListGrants__restarts__when_asked_for_changes_it_has_no_watermark_for()
```

Checks a field with no change feed restarts when asked for changes.

#### Returns

`Task`

### Test\_\_ListGrants\_\_returns\_each\_grant\_once\_\_on\_holders\_its\_field\_is\_granted\_to\_\_at\_the\_smallest\_page()

```csharp
[Fact]
public Task Test__ListGrants__returns_each_grant_once__on_holders_its_field_is_granted_to__at_the_smallest_page()
```

Checks each field's grants are listed once, on its field's object and on holders the field is granted to, and only an inherited one names what it is held through.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_account\_memberships\_name\_listed\_principals()

```csharp
[Fact]
public Task Test__ListPrincipals__account_memberships_name_listed_principals()
```

Checks account memberships name listed principals.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_drops\_each\_principal\_another\_supersedes()

```csharp
[Fact]
public Task Test__ListPrincipals__drops_each_principal_another_supersedes()
```

Checks superseded principals are dropped.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_ends\_every\_kind\_explicitly\_\_never\_repeating\_a\_cursor()

```csharp
[Fact]
public Task Test__ListPrincipals__ends_every_kind_explicitly__never_repeating_a_cursor()
```

Checks each kind ends without a repeated cursor.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_fails\_whole\_\_when\_a\_later\_page\_fails()

```csharp
[Fact]
public Task Test__ListPrincipals__fails_whole__when_a_later_page_fails()
```

Checks a failed later page fails the list.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_holds\_at\_most\_one\_declared\_value\_\_on\_each\_role()

```csharp
[Fact]
public Task Test__ListPrincipals__holds_at_most_one_declared_value__on_each_role()
```

Checks each role holds one declared value.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_holds\_each\_key\_on\_one\_principal\_\_of\_each\_kind()

```csharp
[Fact]
public Task Test__ListPrincipals__holds_each_key_on_one_principal__of_each_kind()
```

Checks each key belongs to one principal.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_holds\_only\_fields\_grantable\_to\_its\_kind\_\_naming\_listed\_principals()

```csharp
[Fact]
public Task Test__ListPrincipals__holds_only_fields_grantable_to_its_kind__naming_listed_principals()
```

Checks principals hold only grantable fields.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_reports\_facts\_only\_on\_held\_values\_\_through\_declared\_kinds()

```csharp
[Fact]
public Task Test__ListPrincipals__reports_facts_only_on_held_values__through_declared_kinds()
```

Checks each grant fact names a value held in effect, through a declared kind.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_reports\_only\_what\_a\_principal\_holds\_directly()

```csharp
[Fact]
public Task Test__ListPrincipals__reports_only_what_a_principal_holds_directly()
```

Checks principals report only direct grants.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_resolves\_every\_reference\_\_unless\_the\_vendor\_names\_someone\_outside\_the\_read()

```csharp
[Fact]
public Task Test__ListPrincipals__resolves_every_reference__unless_the_vendor_names_someone_outside_the_read()
```

Checks the list resolves every reference.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_returns\_each\_account\_once\_\_at\_the\_smallest\_page()

```csharp
[Fact]
public Task Test__ListPrincipals__returns_each_account_once__at_the_smallest_page()
```

Checks each account is listed once.

#### Returns

`Task`

### Test\_\_ListPrincipals\_\_returns\_each\_principal\_once\_\_and\_every\_one\_its\_membership\_lists()

```csharp
[Fact]
public Task Test__ListPrincipals__returns_each_principal_once__and_every_one_its_membership_lists()
```

Checks each principal is listed once.

#### Returns

`Task`

### Test\_\_Manifest\_\_declares\_what\_the\_connector\_implements()

```csharp
[Fact]
public void Test__Manifest__declares_what_the_connector_implements()
```

### Test\_\_Manifest\_\_has\_no\_problems()

```csharp
[Fact]
public void Test__Manifest__has_no_problems()
```

Checks the manifest has no problems.

### Test\_\_ReadCatalog\_\_binds\_each\_role\_to\_a\_scope\_\_of\_its\_fields\_scope()

```csharp
[Fact]
public Task Test__ReadCatalog__binds_each_role_to_a_scope__of_its_fields_scope()
```

Checks each scope a value binds its role to is of its field's scope.

#### Returns

`Task`

### Test\_\_ReadCatalog\_\_fills\_every\_values\_source()

```csharp
[Fact]
public Task Test__ReadCatalog__fills_every_values_source()
```

Checks the catalog fills every lookup list and every object fields take values from.

#### Returns

`Task`

### Test\_\_ReadCatalog\_\_lists\_every\_entitlement\_an\_account\_or\_principal\_holds()

```csharp
[Fact]
public Task Test__ReadCatalog__lists_every_entitlement_an_account_or_principal_holds()
```

Checks the catalog lists every held entitlement.

#### Returns

`Task`

### Test\_\_ReadCatalog\_\_lists\_every\_resource\_of\_each\_declared\_kind\_\_once\_\_under\_a\_listed\_parent()

```csharp
[Fact]
public Task Test__ReadCatalog__lists_every_resource_of_each_declared_kind__once__under_a_listed_parent()
```

Checks each declared resource is listed once.

#### Returns

`Task`

### Test\_\_ReadCatalog\_\_names\_each\_entitlements\_resource\_\_as\_its\_fields\_object()

```csharp
[Fact]
public Task Test__ReadCatalog__names_each_entitlements_resource__as_its_fields_object()
```

Checks each resource an entitlement names is of its field's object.

#### Returns

`Task`

### Test\_\_Refused\_secret\_\_raises\_credentials\_rejected()

```csharp
[Fact]
public Task Test__Refused_secret__raises_credentials_rejected()
```

Checks a refused secret is reported.

#### Returns

`Task`

### Test\_\_Secrets\_\_never\_show\_\_in\_logs\_spans\_or\_failures()

```csharp
[Fact]
public Task Test__Secrets__never_show__in_logs_spans_or_failures()
```

Checks secrets never show in output.

#### Returns

`Task`

### Test\_\_UpdatePrincipal\_\_leaves\_what\_the\_payload\_does\_not\_name()

```csharp
[Fact]
public Task Test__UpdatePrincipal__leaves_what_the_payload_does_not_name()
```

Checks an update leaves unnamed fields alone.

#### Returns

`Task`

### Test\_\_UpdatePrincipal\_\_raises\_the\_account\_gone\_\_when\_the\_vendor\_deleted\_it()

```csharp
[Fact]
public Task Test__UpdatePrincipal__raises_the_account_gone__when_the_vendor_deleted_it()
```

Checks updating a deleted account raises gone.

#### Returns

`Task`

### Test\_\_UpdatePrincipal\_\_settles\_\_when\_run\_twice()

```csharp
[Fact]
public Task Test__UpdatePrincipal__settles__when_run_twice()
```

Checks a repeated update settles.

#### Returns

`Task`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.