public void TestSccComand()
        {
            // Create the package
            BasicSccProvider package = new BasicSccProvider();
            // Create a basic service provider
            OleServiceProvider serviceProvider = OleServiceProvider.CreateOleServiceProviderWithBasicServices();

            // Need to mock a service implementing IVsRegisterScciProvider, because the scc provider will register with it
            IVsRegisterScciProvider registerScciProvider = MockRegisterScciProvider.GetBaseRegisterScciProvider();

            serviceProvider.AddService(typeof(IVsRegisterScciProvider), registerScciProvider, true);

            // Site the package
            Assert.AreEqual(0, ((IVsPackage)package).SetSite(serviceProvider), "SetSite did not return S_OK");

            // Test the scc command by toggleing it twice
            MethodInfo method = typeof(BasicSccProvider).GetMethod("OnSccCommand", BindingFlags.NonPublic | BindingFlags.Instance);

            TestSccCommand commandWell = new TestSccCommand();
            CommandID      cmdID       = new CommandID(new System.Guid(), 0);
            MenuCommand    command     = new MenuCommand(new EventHandler(commandWell.OnSccCommand), cmdID);
            object         result      = method.Invoke(package, new object[] { command, null });

            Assert.AreEqual(true, command.Checked, "OnSccCommand did not execute correctly");

            result = method.Invoke(package, new object[] { command, null });
            Assert.AreEqual(false, command.Checked, "OnSccCommand did not execute correctly");
        }
        public void TestSccComand()
        {
            // Create the package
            BasicSccProvider package = new BasicSccProvider();
            // Create a basic service provider
            OleServiceProvider serviceProvider = OleServiceProvider.CreateOleServiceProviderWithBasicServices();

            // Need to mock a service implementing IVsRegisterScciProvider, because the scc provider will register with it
            IVsRegisterScciProvider registerScciProvider = MockRegisterScciProvider.GetBaseRegisterScciProvider();
            serviceProvider.AddService(typeof(IVsRegisterScciProvider), registerScciProvider, true);

            // Site the package
            Assert.AreEqual(0, ((IVsPackage)package).SetSite(serviceProvider), "SetSite did not return S_OK");

            // Test the scc command by toggleing it twice
            MethodInfo method = typeof(BasicSccProvider).GetMethod("OnSccCommand", BindingFlags.NonPublic | BindingFlags.Instance);

            TestSccCommand commandWell = new TestSccCommand();
            CommandID cmdID = new CommandID(new System.Guid(), 0);
            MenuCommand command = new MenuCommand(new EventHandler(commandWell.OnSccCommand), cmdID);
            object result = method.Invoke(package, new object[] { command, null });
            Assert.AreEqual(true, command.Checked, "OnSccCommand did not execute correctly");

            result = method.Invoke(package, new object[] { command, null });
            Assert.AreEqual(false, command.Checked, "OnSccCommand did not execute correctly");
        }