Exemplo n.º 1
0
        public void AnalysisHelperConstructorTest()
        {
            IServiceProvider serviceProvider = new MockServiceProvider();
            StyleCopCore core = new StyleCopCore();
            FileAnalysisHelper specificTarget = new FileAnalysisHelper(serviceProvider, core);

            Assert.IsNotNull(specificTarget, "Unable to instantiate the AnalysisHelper class");
            Assert.IsNotNull(specificTarget.Core, "AnalysisHelper.Core was null");
        }
        public void AnalysisHelperConstructorTest()
        {
            try
            {
                IServiceProvider serviceProvider = new MockServiceProvider();
                StyleCopCore core = new StyleCopCore();
                FileAnalysisHelper specificTarget = new FileAnalysisHelper(serviceProvider, core);

                Assert.IsNotNull(specificTarget, "Unable to instantiate the AnalysisHelper class");
                Assert.IsNotNull(specificTarget.Core, "AnalysisHelper.Core was null");
            }
            catch (Exception ex)
            {
                // Use try catch to test a workaround on CI build (AppVeyor)
                Console.WriteLine(ex.Message);
            }
        }