Пример #1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Starting COM AddIn unit test");
            GetTaxPrepAppUsingGuid();
            var lMenuService = (IAppMenuService)_appInstance;

            var lRootMenu = lMenuService.AddRootMenu("Com AddIn Unit Test");

            lRootMenu.Visible = true;
            lRootMenu.Enabled = true;

            MenuTests.InitTestEvents(lRootMenu, true);
            ModuleManagerTests.InitTestEvents(_appInstance);
            TaxApplicationTests.InitTestEvents(_appInstance);

            TestHost.AddTestMenu(_appInstance, lRootMenu, true);
            Console.WriteLine("Select 'Com AddIn Unit Test > Run Unit Tests' from TaxPrep menu");
            Console.WriteLine("Press any key when to exit");
            Console.ReadKey();
        }
Пример #2
0
        public override void InitializeTaxPrepAddin()
        {
            try
            {
                var lMenuService = (IAppMenuService)_appInstance;

                var lRootMenu = lMenuService.AddRootMenu("Unit Test AddIn");
                lRootMenu.Visible = true;
                lRootMenu.Enabled = true;

                MenuTests.InitTestEvents(lRootMenu, true);
                ModuleManagerTests.InitTestEvents(_appInstance);
                TaxApplicationTests.InitTestEvents(_appInstance);

                TestHost.AddTestMenu(_appInstance, lRootMenu, true);
            }
            catch (Exception)
            {
                ReleaseApp();
                throw;
            }
        }