public void Create_Valid_DialogDynamicEntityDirective() { var actual = new DialogUpdateDynamicEntities { UpdateBehavior = UpdateBehavior.Replace }; var airportSlotType = new SlotType { Name = "AirportSlotType", Values = new[] { new SlotTypeValue { Id = "BOS", Name = new SlotTypeValueName { Value = "Logan International Airport", Synonyms = new[] { "Boston Logan" } } }, new SlotTypeValue { Id = "LGA", Name = new SlotTypeValueName { Value = "LaGuardia Airport", Synonyms = new[] { "New York" } } } } }; actual.Types.Add(airportSlotType); Assert.True(Utility.CompareJson(actual, "DialogDynamicEntity.json")); }
private static DialogUpdateDynamicEntities Create_DynamicEntityDirective(string slotWord) { var actual = new DialogUpdateDynamicEntities { UpdateBehavior = UpdateBehavior.Replace }; var wordsToReadType = new SlotType { Name = "wordsToReadType", Values = new[] { new SlotTypeValue { Id = "1", Name = new SlotTypeValueName { Value = slotWord, Synonyms = new[] { "" } } } } }; actual.Types.Add(wordsToReadType); return(actual); }