public void ExpectFailure <ExceptionType>(PrintProfileFFF settings) where ExceptionType : Exception
        {
            // Arrange
            var resultGenerator = TestRunnerFactoryFFF.CreateResultGenerator(settings);
            var resultAnalyzer  = new ResultAnalyzer <FeatureInfo>(new FeatureInfoFactoryFFF(), new ConsoleLogger());
            var print           = new PrintTestRunner(CaseName, resultGenerator, resultAnalyzer);

            // Act
            print.GenerateFile();

            // Assert
            Assert.ThrowsException <ExceptionType>(() =>
            {
                print.CompareResults();
            });
        }
Esempio n. 2
0
        public void ExpectFailure <ExceptionType>(GenericRepRapSettings settings) where ExceptionType : Exception
        {
            // Arrange
            var engine          = new EngineFFF();
            var resultGenerator = new ResultGenerator(engine, new ConsoleLogger())
            {
                Settings = settings
            };
            var resultAnalyzer = new ResultAnalyzer <FeatureInfo>(new FeatureInfoFactoryFFF());
            var print          = new PrintTestRunner(CaseName, resultGenerator, resultAnalyzer);

            // Act
            print.GenerateFile();

            // Assert
            Assert.ThrowsException <ExceptionType>(() =>
            {
                print.CompareResults();
            });
        }