Esempio n. 1
0
        public virtual void Initialize()
        {
            serviceProvider = Microsoft.VsSDK.UnitTestLibrary.OleServiceProvider.CreateOleServiceProviderWithBasicServices();
            // Solution Support
            serviceProvider.AddService(typeof(SVsSolution), MockIVsSolution.GetInstance(), false);
            // Project Types Support
            serviceProvider.AddService(typeof(SVsRegisterProjectTypes), MockIVsRegisterProjectTypes.GetInstance(), false);
            // UIShell Support
            BaseMock uiShell = MockIVsUIShell.GetInstance();

            serviceProvider.AddService(typeof(SVsUIShell), (IVsUIShell)uiShell, false);
            serviceProvider.AddService(typeof(SVsUIShellOpenDocument), (IVsUIShellOpenDocument)uiShell, false);
            // Shell Support
            serviceProvider.AddService(typeof(SVsShell), MockIVsShell.GetInstance(), false);
            // Build Manager support
            serviceProvider.AddService(typeof(SVsSolutionBuildManager), MockIVsSolutionBuildManager.GetInstance(), false);
            // ILocalRegistry support
            serviceProvider.AddService(typeof(SLocalRegistry), (ILocalRegistry)MockILocalRegistry.GetInstance(), false);

            // SVsFileChangeEx support
            serviceProvider.AddService(typeof(SVsFileChangeEx), MockIVsFileChangeEx.GetInstance(), false);
        }
Esempio n. 2
0
 public void Initialize()
 {
     serviceProvider = Microsoft.VsSDK.UnitTestLibrary.OleServiceProvider.CreateOleServiceProviderWithBasicServices();
     serviceProvider.AddService(typeof(SVsSolution), MockIVsSolution.GetInstance(), false);
     serviceProvider.AddService(typeof(SVsRegisterProjectTypes), MockIVsRegisterProjectTypes.GetInstance(), false);
 }