Skip to content
Tracon

TestData

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

Sample data used by the tests.

public static class TestData

objectTestData

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Produces a sample agent definition.

public static AgentDefinition Definition(string name)

name string

The agent name.

AgentDefinition

The definition.

Produces a sample eval case.

public static EvalCase EvalCase(Guid suiteId, string query = "question")

suiteId Guid

The ID of the suite it belongs to.

query string

The query text.

EvalCase

The case.

Produces a sample eval case draft, as if promoted from a production run.

public static EvalCaseDraft EvalCaseDraft(Guid? sourceRunId = null, string query = "question")

sourceRunId Guid?

The ID of the promoted run.

query string

The query text.

EvalCaseDraft

The draft.

Produces a sample eval run.

public static EvalRun EvalRun(string tenantId, Guid suiteId)

tenantId string

The tenant ID.

suiteId Guid

The ID of the suite being measured.

EvalRun

The run.

Produces a sample eval suite.

public static EvalSuite EvalSuite(string tenantId = "default", string name = "customer-support-team")

tenantId string

The tenant ID.

name string

The suite name.

EvalSuite

The suite.

Produces a sample run event.

public static RunEvent Event(Guid runId, long sequence)

runId Guid

The run ID.

sequence long

The sequence number.

RunEvent

The event.

Produces a sample queued job. Ready to pass to EnqueueAsync.

public static JobRecord Job(string tenantId = "default", DateTimeOffset? scheduledFor = null)

tenantId string

The tenant ID.

scheduledFor DateTimeOffset?

The time the job is due to run. Defaults to now.

JobRecord

The job record.

Produces a sample run start.

public static RunStartInfo Run(Guid runId, string agentName = "test-agent")

runId Guid

The run ID.

agentName string

The agent name.

RunStartInfo

The start info.

Produces a sample schedule.

public static JobSchedule Schedule(string tenantId = "default", string name = "night-report")

tenantId string

The tenant ID.

name string

The schedule name.

JobSchedule

The schedule.

Produces a sample session record.

public static SessionRecord Session(string sessionId, JsonElement? state = null)

sessionId string

The session ID.

state JsonElement?

The serialized state. A sample object is used when omitted.

SessionRecord

The session record.

Converts raw JSON text to a JsonElement.

public static JsonElement State(string json)

json string

The JSON text.

JsonElement

A standalone JSON element.