public void TestAddHierarchicalEntity() { string entityname = "TestAddHierarchicalEntity"; var childEntities = new List <string>() { "ChildEntity3", "ChildEntity4" }; LuisModel model = new LuisModel(luisAppID, ocpAcimSubscriptionKey); try { model.Modify() .AddHierarchicalEntity(entityname, childEntities) .Update(); var entityNames = model.GetEntities().Keys; Assert.IsTrue(entityNames.Contains(entityname)); foreach (var entity in childEntities) { Assert.IsFalse(entityNames.Contains(entity)); } } finally { model.DeleteEntity(entityname); } }
public void TestAddClosedListEntity() { string entityname = "TestAddClosedListEntity"; var washington = new Dictionary <string, IEnumerable <string> > { { "Washington", new List <string>() { "WA", "Washington" } } }; LuisModel model = new LuisModel(luisAppID, ocpAcimSubscriptionKey); try { model.Modify() .AddClosedListEntity(entityname, washington) .Update(); var entityNames = model.GetEntities().Keys; Assert.IsTrue(entityNames.Contains(entityname)); } finally { model.DeleteEntity(entityname); } }
public void TestAddSimpleEntity() { string entityname = "TestAddSimpleEntity"; LuisModel model = new LuisModel(luisAppID, ocpAcimSubscriptionKey); try { model.Modify() .AddSimpleEntity(entityname) .Update(); var entityNames = model.GetEntities().Keys; Assert.IsTrue(entityNames.Contains(entityname)); } finally { model.DeleteEntity(entityname); } }
public void TestGettingEntities() { LuisModel model = new LuisModel(luisAppID, ocpAcimSubscriptionKey); var intentNames = model.GetEntities().Keys; }