Add seasonal and presence charm batches
This commit is contained in:
@@ -164,6 +164,10 @@ public sealed class LegacyMimCatalogImporterTests
|
||||
reply.Contains("maybe enjoy some flowers and all things spring", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.PersonalityReplies, reply =>
|
||||
reply.Contains("pet elephant", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.PersonalityReplies, reply =>
|
||||
reply.Contains("mostly roboting", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.PersonalityReplies, reply =>
|
||||
reply.Contains("robot stuff", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -177,6 +181,12 @@ public sealed class LegacyMimCatalogImporterTests
|
||||
|
||||
var catalog = LegacyMimCatalogImporter.ImportCatalog(rootDirectory);
|
||||
|
||||
Assert.Contains(catalog.GreetingReplies, reply =>
|
||||
reply.Contains("It's nice to be here", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.GreetingReplies, reply =>
|
||||
reply.Contains("thinking about shoes", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.GreetingReplies, reply =>
|
||||
reply.Contains("powered directly by the sun", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.GreetingReplies, reply =>
|
||||
reply.Contains("Another year older, another year wiser", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.GreetingReplies, reply =>
|
||||
|
||||
@@ -594,6 +594,29 @@ public sealed class JiboInteractionServiceTests
|
||||
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("welcome back", "welcome_back", "it's nice to be here")]
|
||||
[InlineData("what are you thinking", "robot_what_are_you_thinking", "thinking about how fun, yet scary")]
|
||||
[InlineData("what have you been doing", "robot_what_have_you_been_doing", "mostly roboting")]
|
||||
[InlineData("what did you do", "robot_what_did_you_do", "robot stuff")]
|
||||
public async Task BuildDecisionAsync_PresenceCharm_UsesImportedReplies(
|
||||
string transcript,
|
||||
string expectedIntent,
|
||||
string expectedReplySnippet)
|
||||
{
|
||||
var service = CreateService();
|
||||
|
||||
var decision = await service.BuildDecisionAsync(new TurnContext
|
||||
{
|
||||
RawTranscript = transcript,
|
||||
NormalizedTranscript = transcript
|
||||
});
|
||||
|
||||
Assert.Equal(expectedIntent, decision.IntentName);
|
||||
Assert.Contains(expectedReplySnippet, decision.ReplyText, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("are you kind", "robot_is_kind", "kindest robot i can be")]
|
||||
[InlineData("are you funny", "robot_is_funny", "not intentionally")]
|
||||
|
||||
Reference in New Issue
Block a user