Added whole documents to the Translation, Grammar & Spelling, and Rewrite & Improve assistants (#1179)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Sabrina-devopsandThorsten Sommer authored and GitHub committed 2026-11-28 20:27:23 +01:00
1 parent f7666861f1
commit 918572c158
150 files changed
+12850 -302

No files matched your search

@@ -0,0 +1,35 @@
using AIStudio.Tools;
namespace AIStudio.Tests.Tools;
/// <summary>
/// Checks how the prompts of the language assistants name the language the user chose.
/// </summary>
/// <remarks>
/// The Grammar &amp; Spelling Checker, the Rewrite &amp; Improve Text assistant, and the Translation assistant name the
/// language the same way, for a text as well as for a document. The name of a common language comes in the
/// language of the user interface, so its code follows it, and no choice leaves the prompt to name the language
/// of the text.
/// </remarks>
[TestFixture]
public sealed class CommonLanguagePromptTests
{
[Test]
public void NoChoiceNamesNoLanguage() => Assert.That(CommonLanguages.AS_IS.PromptLanguageName("Klingon"), Is.Null);
[Test]
public void ACustomLanguageIsNamedAsTheUserWroteIt() => Assert.That(CommonLanguages.OTHER.PromptLanguageName("Plattdüütsch"), Is.EqualTo("Plattdüütsch"));
[TestCase("")]
[TestCase(" ")]
public void AnEmptyCustomLanguageNamesNoLanguage(string customLanguage) => Assert.That(CommonLanguages.OTHER.PromptLanguageName(customLanguage), Is.Null);
[Test]
public void ACommonLanguageCarriesItsCode()
{
var name = CommonLanguages.DE_AT.PromptLanguageName(string.Empty);
Assert.That(name, Does.StartWith(CommonLanguages.DE_AT.Name));
Assert.That(name, Does.EndWith("(DE_AT)"), "The name follows the language of the user interface, so the code tells the model which language is meant.");
}
}