mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 17:07:22 +00:00
Upgraded to .NET 10 (#1147)
This commit is contained in:
1 parent
faae2951f7
commit
fc7399e81b
327 files changed
+3059
-3049
No files matched your search
@@ -78,12 +78,12 @@ public sealed class TranscriptPromptInjectionTests
|
||||
|
||||
var extraction = await PersistentMediaTranscript.ReadTranscriptAsync(this.rustService, transcript, this.mediaPath, reportingScope: null, CancellationToken.None);
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(this.runtime.ReadFiles, Is.EqualTo(new[] { transcript.TranscriptPath }), "The transcript did not go through the runtime, or the runtime was asked for the recording instead.");
|
||||
Assert.That(extraction.Content, Does.Not.Contain(SUSPICIOUS_PASSAGE), "The suspicious passage reached the AI.");
|
||||
Assert.That(extraction.Content, Does.Contain("Welcome to the meeting.").And.Contain(FakeRuntime.REDACTION_MARKER), "The rest of the transcript got lost.");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -97,11 +97,11 @@ public sealed class TranscriptPromptInjectionTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OnlyAReadyTranscriptCanBeRead()
|
||||
public async Task OnlyAReadyTranscriptCanBeRead()
|
||||
{
|
||||
var transcript = PersistentMediaTranscriptResult.Unavailable(PersistentMediaTranscriptStatus.NO_PROVIDER, null, "No provider.");
|
||||
|
||||
Assert.ThrowsAsync<ArgumentException>(() => PersistentMediaTranscript.ReadTranscriptAsync(this.rustService, transcript, this.mediaPath, reportingScope: null, CancellationToken.None));
|
||||
await Assert.ThrowsAsync<ArgumentException>(() => PersistentMediaTranscript.ReadTranscriptAsync(this.rustService, transcript, this.mediaPath, reportingScope: null, CancellationToken.None));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -113,12 +113,12 @@ public sealed class TranscriptPromptInjectionTests
|
||||
await service.AddCompletedTextAsync(target, this.mediaPath, $"Welcome to the meeting. {SUSPICIOUS_PASSAGE} Let us begin.");
|
||||
var delivered = service.GetPendingDelivery(target)?.Text;
|
||||
|
||||
Assert.Multiple(() =>
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(this.runtime.FilteredTexts, Has.Count.EqualTo(1), "The transcript did not go through the filter.");
|
||||
Assert.That(delivered, Does.Not.Contain(SUSPICIOUS_PASSAGE), "The suspicious passage reached the field, and with it the AI.");
|
||||
Assert.That(delivered, Does.Contain("Welcome to the meeting.").And.Contain(FakeRuntime.REDACTION_MARKER), "The rest of the transcript got lost.");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in new issue
Block a user