Public Access
Generalize settings and logs assistant
PR and Push Build/Test / build-and-test (push) Successful in 16m43s
PR and Push Build/Test / build-and-test (push) Successful in 16m43s
This commit is contained in:
@@ -145,6 +145,40 @@ public sealed class RecordingCoordinatorTests
|
||||
await coordinator.StopAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task StopTreatsRunsShorterThanConfiguredMinimumAsAbort()
|
||||
{
|
||||
var audioSource = new ControlledAudioSource();
|
||||
var artifactCleaner = new CapturingMeetingRunArtifactCleaner();
|
||||
var summaryPipeline = new CapturingMeetingSummaryPipeline();
|
||||
var coordinator = new MeetingRecordingCoordinator(
|
||||
audioSource,
|
||||
new TestSpeechRecognitionPipelineFactory(new EchoStreamingTranscriptionProvider()),
|
||||
new InMemoryTranscriptStore(),
|
||||
new InMemoryMeetingNoteStore(),
|
||||
new CapturingMeetingNoteOpener(),
|
||||
new InMemoryMeetingArtifactStore(),
|
||||
new InMemoryRecordedAudioStore(),
|
||||
summaryPipeline,
|
||||
Options.Create(new MeetingAssistantOptions
|
||||
{
|
||||
Recording =
|
||||
{
|
||||
MinimumCompletedMeetingDuration = TimeSpan.FromMinutes(1)
|
||||
}
|
||||
}),
|
||||
NullLogger<MeetingRecordingCoordinator>.Instance,
|
||||
artifactCleaner: artifactCleaner);
|
||||
|
||||
var started = await coordinator.StartAsync(CancellationToken.None);
|
||||
var stopped = await coordinator.StopAsync(CancellationToken.None);
|
||||
|
||||
Assert.False(stopped.IsRecording);
|
||||
Assert.Null(stopped.MeetingNotePath);
|
||||
Assert.False(summaryPipeline.WasRun);
|
||||
Assert.Equal(started.SummaryPath, artifactCleaner.DeletedArtifacts?.SummaryPath);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task StartUsesCurrentOutlookMeetingMetadataWhenAvailable()
|
||||
{
|
||||
@@ -2240,6 +2274,8 @@ public sealed class RecordingCoordinatorTests
|
||||
|
||||
public MeetingAssistantOptions? Options { get; private set; }
|
||||
|
||||
public bool WasRun => Artifacts is not null;
|
||||
|
||||
public Task<MeetingSummaryRunResult> RunAsync(
|
||||
MeetingSessionArtifacts artifacts,
|
||||
CancellationToken cancellationToken)
|
||||
@@ -2262,6 +2298,23 @@ public sealed class RecordingCoordinatorTests
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class CapturingMeetingRunArtifactCleaner : IMeetingRunArtifactCleaner
|
||||
{
|
||||
public MeetingSessionArtifacts? DeletedArtifacts { get; private set; }
|
||||
|
||||
public MeetingAssistantOptions? Options { get; private set; }
|
||||
|
||||
public Task DeleteRunArtifactsAsync(
|
||||
MeetingSessionArtifacts artifacts,
|
||||
MeetingAssistantOptions options,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
DeletedArtifacts = artifacts;
|
||||
Options = options;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class RecordingSummaryPipeline : IMeetingSummaryPipeline
|
||||
{
|
||||
public List<MeetingSessionArtifacts> ArtifactHistory { get; } = [];
|
||||
|
||||
Reference in New Issue
Block a user