Exemple #1
0
        protected async void UseClientFor(Func <ILuisProgrammaticAPI, Task> doTest, string className = null, [CallerMemberName] string methodName = "")
        {
            using (MockContext context = MockContext.Start(className ?? ClassName, methodName))
            {
                HttpMockServer.Initialize(className ?? ClassName, methodName, mode);
                ILuisProgrammaticAPI client = GetClient(HttpMockServer.CreateInstance());

                await doTest(client);

                context.Stop();
            }
        }
Exemple #2
0
        public BaseProgram(ILuisProgrammaticAPI client) : base("LUIS Programmatic API Demo", true)
        {
            Client = client;
            AddPage(new MainPage(this));

            AddPage(new Management.ListAppsPage(this));
            AddPage(new Management.AppInfoPage(this));
            AddPage(new Management.AppDetailsPage(this));
            AddPage(new Management.AppVersionIntentsPage(this));
            AddPage(new Management.AppVersionEntitiesPage(this));
            AddPage(new Management.AppVersionPrebuiltEntitiesPage(this));
            AddPage(new Management.AppTrainPage(this));
            AddPage(new Management.AppDeletePage(this));
            AddPage(new Management.AppClonePage(this));
            AddPage(new Management.AppImportPage(this));
            AddPage(new Management.AppExportPage(this));
            AddPage(new Management.AppPublishPage(this));
            AddPage(new Management.AppVersionSelector(this));
            AddPage(new Management.AppVersionInfoPage(this));
            AddPage(new Management.AppVersionDetailsPage(this));

            AddPage(new CreateAppPage <GreetingApp.StartPage>(this));
            AddPage(new GreetingApp.StartPage(this));
            AddPage(new GreetingApp.AddUtterancePage(this));

            AddPage(new CreateAppPage <RetailApp.StartPage>(this));
            AddPage(new RetailApp.StartPage(this));
            AddPage(new RetailApp.FlowerpotPage(this));
            AddPage(new RetailApp.AddFlowersPage(this));
            AddPage(new RetailApp.SendFlowersIntentPage(this));

            AddPage(new CreateAppPage <BookingApp.StartPage>(this));
            AddPage(new BookingApp.StartPage(this));
            AddPage(new BookingApp.FlightsEntityPage(this));
            AddPage(new BookingApp.FindFlightsIntentPage(this));

            AddPage(new TemplateSelectorPage(this));
            AddPage(new TrainAppPage(this));
            AddPage(new PublishAppPage(this));
            AddPage(new ShareAppPage(this));

            SetPage <MainPage>();
        }
Exemple #3
0
 public BasePage(string title, BaseProgram program) : base(title, program)
 {
     Client = program.Client;
 }
Exemple #4
0
 public BaseMenuPage(string title, BaseProgram program, params Option[] options) : base(title, program, options)
 {
     Client = program.Client;
 }