public void Setup() { this.mocks = new MockRepository(); this.service = this.mocks.Stub <ISonarRestService>(); this.vshelper = this.mocks.Stub <IVsEnvironmentHelper>(); this.analysisPlugin = this.mocks.Stub <IAnalysisPlugin>(); using (this.mocks.Record()) { SetupResult.For(this.service.GetServerInfo(Arg <ISonarConfiguration> .Is.Anything)).Return(3.6); SetupResult.For(this.service.AuthenticateUser(Arg <ISonarConfiguration> .Is.Anything)).Return(true); SetupResult.For(this.vshelper.ReadSavedOption("Sonar Options", "General", "SonarHost")).Return("serveraddr"); SetupResult.For(this.vshelper.ReadSavedOption("Sonar Options", "General", "SonarUserPassword")).Return("password"); SetupResult.For(this.vshelper.ReadSavedOption("Sonar Options", "General", "SonarUserName")).Return("login"); } }
public void Setup() { this.mocks = new MockRepository(); this.service = this.mocks.Stub<ISonarRestService>(); this.vshelper = this.mocks.Stub<IVsEnvironmentHelper>(); this.analysisPlugin = this.mocks.Stub<IAnalysisPlugin>(); using (this.mocks.Record()) { SetupResult.For(this.service.GetServerInfo(Arg<ISonarConfiguration>.Is.Anything)).Return(3.6); SetupResult.For(this.service.AuthenticateUser(Arg<ISonarConfiguration>.Is.Anything)).Return(true); SetupResult.For(this.vshelper.ReadSavedOption("Sonar Options", "General", "SonarHost")).Return("serveraddr"); SetupResult.For(this.vshelper.ReadSavedOption("Sonar Options", "General", "SonarUserPassword")).Return("password"); SetupResult.For(this.vshelper.ReadSavedOption("Sonar Options", "General", "SonarUserName")).Return("login"); } }
/// <summary> /// Initializes a new instance of the <see cref="CxxLocalExtension"/> class. /// </summary> /// <param name="cxxPlugin"> /// The cxx plugin. /// </param> public CxxLocalExtension(IAnalysisPlugin cxxPlugin) { this.commandPlugin = cxxPlugin; this.pluginOptions = cxxPlugin.GetPluginControlOptions(new ConnectionConfiguration()); this.options = this.pluginOptions.GetOptions(); this.issues = new List<Issue>(); this.sensors = new Dictionary<string, ASensor> { { CppCheckSensor.SKey, new CppCheckSensor(this.pluginOptions) }, { RatsSensor.SKey, new RatsSensor(this.pluginOptions) }, { VeraSensor.SKey, new VeraSensor(this.pluginOptions) }, { PcLintSensor.SKey, new PcLintSensor(this.pluginOptions) }, { CxxExternalSensor.SKey, new CxxExternalSensor(this.pluginOptions) } }; }