public void SolutionBindingOperation_GetRuleSetInformation() { // Arrange SolutionBindingOperation testSubject = this.CreateTestSubject("key"); // Test case 1: unknown ruleset map // Act + Assert using (new AssertIgnoreScope()) { testSubject.GetRuleSetInformation(Language.CSharp).Should().BeNull(); } // Test case 2: known ruleset map // Arrange var ruleSetMap = new Dictionary <Language, RuleSet>(); ruleSetMap[Language.CSharp] = new RuleSet("cs"); ruleSetMap[Language.VBNET] = new RuleSet("vb"); testSubject.RegisterKnownRuleSets(ruleSetMap); testSubject.Initialize(new ProjectMock[0], GetQualityProfiles()); testSubject.Prepare(CancellationToken.None); // Act string filePath = testSubject.GetRuleSetInformation(Language.CSharp).NewRuleSetFilePath; // Assert string.IsNullOrWhiteSpace(filePath).Should().BeFalse(); filePath.Should().Be(testSubject.RuleSetsInformationMap[Language.CSharp].NewRuleSetFilePath, "NewRuleSetFilePath is expected to be updated during Prepare and returned now"); }