Ejemplo n.º 1
0
        public void DefaultCodeInspectionsIsNotNull()
        {
            var configService = new ConfigurationLoader();
            var config = configService.GetDefaultCodeInspections();

            Assert.IsNotNull(config);
        }
Ejemplo n.º 2
0
        public void DefaultCodeInspectionsIsNotNull()
        {
            var configService = new ConfigurationLoader();
            var config        = configService.GetDefaultCodeInspections();

            Assert.IsNotNull(config);
        }
Ejemplo n.º 3
0
        public void DefaultCodeInspectionsIsAsSpecified()
        {
            var inspection = new Mock<IInspection>();
            inspection.SetupGet(m => m.Description).Returns("TestInspection");
            inspection.SetupGet(m => m.Name).Returns("TestInspection");
            inspection.SetupGet(m => m.Severity).Returns(CodeInspectionSeverity.DoNotShow);

            var expected = new[] { inspection.Object };
            var configService = new ConfigurationLoader(expected, null);

            var actual = configService.GetDefaultCodeInspections();

            Assert.AreEqual(expected.Length, actual.Length);
            Assert.AreEqual(inspection.Object.Name, actual[0].Name);
            Assert.AreEqual(inspection.Object.Severity, actual[0].Severity);
        }
        public void DefaultCodeInspectionsIsAsSpecified()
        {
            var inspection = new Mock <IInspection>();

            inspection.SetupGet(m => m.Description).Returns("TestInspection");
            inspection.SetupGet(m => m.Name).Returns("TestInspection");
            inspection.SetupGet(m => m.Severity).Returns(CodeInspectionSeverity.DoNotShow);

            var expected      = new[] { inspection.Object };
            var configService = new ConfigurationLoader(expected, null);

            var actual = configService.GetDefaultCodeInspections();

            Assert.AreEqual(expected.Length, actual.Length);
            Assert.AreEqual(inspection.Object.Name, actual[0].Name);
            Assert.AreEqual(inspection.Object.Severity, actual[0].Severity);
        }