public void EmptyDoWhileBlock_InspectionType()
        {
            var inspection         = new EmptyDoWhileBlockInspection(null);
            var expectedInspection = CodeInspectionType.MaintainabilityAndReadabilityIssues;

            Assert.AreEqual(expectedInspection, inspection.InspectionType);
        }
        public void EmptyDoWhileBlock_InspectionName()
        {
            const string expectedName = nameof(EmptyDoWhileBlockInspection);
            var          inspection   = new EmptyDoWhileBlockInspection(null);

            Assert.AreEqual(expectedName, inspection.Name);
        }
Esempio n. 3
0
        private void CheckActualEmptyBlockCountEqualsExpected(string inputCode, int expectedCount)
        {
            IVBComponent component;
            var          vbe   = MockVbeBuilder.BuildFromSingleStandardModule(inputCode, out component);
            var          state = MockParser.CreateAndParse(vbe.Object);

            var inspection    = new EmptyDoWhileBlockInspection(state);
            var inspector     = InspectionsHelper.GetInspector(inspection);
            var actualResults = inspector.FindIssuesAsync(state, CancellationToken.None).Result;

            Assert.AreEqual(expectedCount, actualResults.Count());
        }
Esempio n. 4
0
        public void EmptyDoWhileBlock_InspectionName()
        {
            var inspection = new EmptyDoWhileBlockInspection(null);

            Assert.AreEqual(nameof(EmptyDoWhileBlockInspection), inspection.Name);
        }