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 TestAddCompositeEntity()
        {
            string    entityname  = "TestAddCompositeEntity";
            string    childEntity = "ChildEntity";
            LuisModel model       = new LuisModel(luisAppID, ocpAcimSubscriptionKey);

            try
            {
                model.Modify()
                .AddSimpleEntity(childEntity)
                .AddCompositeEntity(entityname, new string[] { childEntity })
                .Update();

                var entityNames = model.GetEntities().Keys;
                Assert.IsTrue(entityNames.Contains(entityname));
            }
            finally
            {
                model.DeleteEntity(entityname);
                model.DeleteEntity(childEntity);
            }
        }