Beispiel #1
0
        private IServiceProvider CreateServiceProvider(IVsShell vsShell)
        {
            var serviceProvider = new Mock <IServiceProvider>();

            serviceProvider.Setup(x => x.GetService(typeof(SVsShell))).Returns(vsShell);

            return(serviceProvider.Object);
        }
Beispiel #2
0
        private IVsVersionProvider CreateTestSubject(IVsShell vsShell, ISetupConfiguration2 setupConfiguration, ILogger logger = null)
        {
            logger ??= Mock.Of <ILogger>();

            var setupConfigurationProvider = new Mock <ISetupConfigurationProvider>();

            setupConfigurationProvider.Setup(x => x.Get()).Returns(setupConfiguration);

            return(new VsVersionProvider(CreateServiceProvider(vsShell), setupConfigurationProvider.Object, logger));
        }