object IServiceProvider.GetService(System.Type serviceType)
        {
            if ( serviceType.IsEquivalentTo(typeof(IVsToolWindowToolbar)) )
                return this;

            if ( serviceType.IsEquivalentTo(typeof(IOleCommandTarget)) )
                return commandService;

            if ( (serviceType.IsEquivalentTo(typeof(IVsToolWindowToolbarHost))) && (null != ToolbarHost) )
                return ToolbarHost;

            return provider.GetService(serviceType);
        }
 public void VerifyStaticTypeCorrectlyInvokesMethodsVerify()
 {
     // Fixture setup
     Type type = typeof(UngardedStaticMethodOnStaticTypeHost);
     var expectedMethods = new[] { type.GetMethod("Method")};
     var mockVerified = false;
     var sut = new DelegatingIdiomaticAssertion
     {
         OnMethodInfosVerify = m => mockVerified = expectedMethods.IsEquivalentTo(m)
     };
     // Exercise system
     sut.Verify(type);
     // Verify outcome
     Assert.True(mockVerified, "Mock verified.");
     // Teardown
 }
 public void Should_determine_that_two_enumerables_are_not_equivalent()
 {
     var items = new[] {1, 2};
     Assert.That(items.IsEquivalentTo(new[] {1, 2, 3}), Is.False);
 }