Port more legacy charm MIMs into Build B
This commit is contained in:
@@ -89,6 +89,14 @@ public sealed class LegacyMimCatalogImporterTests
|
||||
Assert.Contains("Unless I missed something, we're in my home as we speak.", catalog.PersonalityReplies);
|
||||
Assert.Contains("For now just English. But someday I'd like to learn more. I like languages.", catalog.PersonalityReplies);
|
||||
Assert.Contains("I was put together in a factory piece by piece.", catalog.PersonalityReplies);
|
||||
Assert.Contains("I really like sunflowers.", catalog.PersonalityReplies);
|
||||
Assert.Contains("Ha. Of course I know R2D2. I mean, not personally.", catalog.PersonalityReplies);
|
||||
Assert.Contains("Yes! I like all things in space. They're so spacey.", catalog.PersonalityReplies);
|
||||
Assert.Contains("Yes yes, I think kids are great. They're a little closer to my size.", catalog.PersonalityReplies);
|
||||
Assert.Contains(catalog.PersonalityReplies, reply =>
|
||||
reply.Contains("I do things like this when I'm happy", StringComparison.OrdinalIgnoreCase));
|
||||
Assert.Contains(catalog.PersonalityReplies, reply =>
|
||||
reply.Contains("Is that a trick question", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -399,6 +399,33 @@ public sealed class JiboInteractionServiceTests
|
||||
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("what is your favorite flower", "robot_favorite_flower", "sunflowers")]
|
||||
[InlineData("what's your favorite flower", "robot_favorite_flower", "sunflowers")]
|
||||
[InlineData("do you like R2D2", "robot_likes_r2d2", "A legend. A true legend.")]
|
||||
[InlineData("do you like the sun", "robot_likes_sun", "favorite star in the universe")]
|
||||
[InlineData("do you like space", "robot_likes_space", "I love space")]
|
||||
[InlineData("do you like kids", "robot_likes_kids", "kids are so fun")]
|
||||
[InlineData("can you laugh", "robot_can_laugh", "when I'm happy")]
|
||||
[InlineData("can you dance", "robot_can_dance", "dancing is one of the things I know best")]
|
||||
public async Task BuildDecisionAsync_NewLegacyPersonalityMims_UseImportedReplies(
|
||||
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("how do you work", "robot_how_do_you_work", "Hello! Thank you for updating me I am proud of the community's work Many people have gotten together to care for me more than em eye tee ever did. I hope that I can catch up even though it has been seven years.")]
|
||||
[InlineData("what do you eat", "robot_what_do_you_eat", "The only thing I consume is electricity.")]
|
||||
|
||||
Reference in New Issue
Block a user