コード例 #1
0
        public void QuickFixBase_Unregister()
        {
            var vbe   = MockVbeBuilder.BuildFromSingleStandardModule(string.Empty, out _);
            var state = MockParser.CreateAndParse(vbe.Object);

            var quickFix = new RemoveCommentQuickFix(state);

            quickFix.RemoveInspections(quickFix.SupportedInspections.ToArray());

            Assert.IsFalse(quickFix.SupportedInspections.Any());
        }
コード例 #2
0
        public void QuickFixBase_Register()
        {
            var vbe   = MockVbeBuilder.BuildFromSingleStandardModule(string.Empty, out _);
            var state = MockParser.CreateAndParse(vbe.Object);

            var quickFix = new RemoveCommentQuickFix(state);

            quickFix.RegisterInspections(typeof(EmptyStringLiteralInspection));

            Assert.IsTrue(quickFix.SupportedInspections.Contains(typeof(EmptyStringLiteralInspection)));
        }