public static void ClassCleanup() { sandoService = null; package.SetSite(null); package.Close(); package = null; }
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"); }