Inheritance: Microsoft.VisualStudio.Shell.Package
Esempio n. 1
0
 public void SetSite()
 {
     // Create the package
     IVsPackage package = new ProjectExtenderPackage() as IVsPackage;
     Assert.IsNotNull(package, "The object does not implement IVsPackage");
     // Create a basic service provider
     OleServiceProvider serviceProvider = OleServiceProvider.CreateOleServiceProviderWithBasicServices();
     object mock = Package.GetGlobalService(typeof(Microsoft.VisualStudio.Shell.Interop.SVsRegisterProjectTypes));
     serviceProvider.AddService(typeof(Microsoft.VisualStudio.Shell.Interop.SVsRegisterProjectTypes), mock, true);
     // Site the package
     Assert.AreEqual(0, package.SetSite(serviceProvider), "SetSite did not return S_OK");
     // Unsite the package
     Assert.AreEqual(0, package.SetSite(null), "SetSite(null) did not return S_OK");
 }
Esempio n. 2
0
 public void IsIVsPackage()
 {
     ProjectExtenderPackage package = new ProjectExtenderPackage();
     Assert.IsNotNull(package as IVsPackage, "The object does not implement IVsPackage");
 }
Esempio n. 3
0
 public void CreateInstance()
 {
     ProjectExtenderPackage package = new ProjectExtenderPackage();
 }