Пример #1
0
        public void Can_Get_SlotValue_For_Intent(string slotName)
        {
            SkillRequest skillRequest  = TestUtilities.EntityFromFile <SkillRequest>(testFilePath, testFile);
            var          intentRequest = (IntentRequest)skillRequest.Request;
            var          ItemID        = IntentRequestExtensions.GetSlotValue(intentRequest, slotName);
            var          success       = intentRequest.Intent.Slots.TryGetValue(slotName, out Slot slot);

            ItemID.Should().Equals(slot.Value);
        }
Пример #2
0
        public void NotFound_SlotValue_For_Intent(string slotValue)
        {
            SkillRequest skillRequest  = TestUtilities.EntityFromFile <SkillRequest>(testFilePath, testFile);
            var          intentRequest = (IntentRequest)skillRequest.Request;

            intentRequest.Intent.Slots[slotValue].Value = null;
            var success = IntentRequestExtensions.GetSlotValue(intentRequest, slotValue);

            success.Should().Equals(null);
        }