Пример #1
0
 public static void ClassCleanup()
 {
     sandoService = null;
     package.SetSite(null);
     package.Close();
     package = null;
 }
Пример #2
0
 public static void ClassCleanup()
 {
     sandoService = null;
     package.SetSite(null);
     package.Close();
     package = null;
 }
Пример #3
0
        public static void ClassInitialize(TestContext testContext)
        {
            // Create SandoServicePackage
            UIPackage packageObject = new UIPackage();
            var package = (IVsPackage)packageObject;
            Assert.IsNotNull(package, "Get a null UIPackage instance.");
            MessageBox.Show("hi");

            IServiceProvider serviceProvider = package as IServiceProvider;
            // Get Sando Service
            object o = serviceProvider.GetService(typeof(SSandoGlobalService));
            Assert.IsNotNull(o, "GetService returned null for the global service.");
            MessageBox.Show("hi2");

            sandoService = o as ISandoGlobalService;
            Assert.IsNotNull(sandoService, "The service SSandoGlobalService does not implements ISandoGlobalService.");
            MessageBox.Show("hi3");
        }
Пример #4
0
        public static void ClassInitialize(TestContext testContext)
        {
            // Create SandoServicePackage
            UIPackage packageObject = new UIPackage();
            var       package       = (IVsPackage)packageObject;

            Assert.IsNotNull(package, "Get a null UIPackage instance.");
            MessageBox.Show("hi");

            IServiceProvider serviceProvider = package as IServiceProvider;
            // Get Sando Service
            object o = serviceProvider.GetService(typeof(SSandoGlobalService));

            Assert.IsNotNull(o, "GetService returned null for the global service.");
            MessageBox.Show("hi2");

            sandoService = o as ISandoGlobalService;
            Assert.IsNotNull(sandoService, "The service SSandoGlobalService does not implements ISandoGlobalService.");
            MessageBox.Show("hi3");
        }