public void EmptyCaseBlock_InspectionType() { var inspection = new EmptyCaseBlockInspection(null); var expectedInspection = CodeInspectionType.CodeQualityIssues; Assert.AreEqual(expectedInspection, inspection.InspectionType); }
public void EmptyCaseBlock_InspectionName() { const string expectedName = nameof(EmptyCaseBlockInspection); var inspection = new EmptyCaseBlockInspection(null); Assert.AreEqual(expectedName, inspection.Name); }
private void CheckActualEmptyBlockCountEqualsExpected(string inputCode, int expectedCount) { var vbe = MockVbeBuilder.BuildFromSingleStandardModule(inputCode, out var _); var state = MockParser.CreateAndParse(vbe.Object); var inspection = new EmptyCaseBlockInspection(state); var inspector = InspectionsHelper.GetInspector(inspection); var actualResults = inspector.FindIssuesAsync(state, CancellationToken.None).Result; Assert.AreEqual(expectedCount, actualResults.Count()); }
public void EmptyCaseBlock_InspectionName() { var inspection = new EmptyCaseBlockInspection(null); Assert.AreEqual(nameof(EmptyCaseBlockInspection), inspection.Name); }