public void OnExecuteAsync_Should_NotThrow(
            IConsoleOutput console,
            IProgressReporter progressReporter,
            IOpenApiDocumentFactory openApiDocumentFactory,
            INSwagOptions options,
            INSwagCodeGeneratorFactory codeGeneratorFactory,
            ICodeGenerator generator,
            string outputFile,
            string code)
        {
            var sut = new NSwagCommand(
                console,
                progressReporter,
                openApiDocumentFactory,
                options,
                codeGeneratorFactory);

            sut.OutputFile = outputFile;

            Mock.Get(generator)
            .Setup(c => c.GenerateCode(progressReporter))
            .Returns(code);

            new Func <int>(sut.OnExecute).Should().NotThrow();
        }
        public void OnExecuteAsync_Should_NotThrow(
            [Frozen] IProgressReporter progressReporter,
            [Frozen] ICodeGenerator generator,
            NSwagCommand sut,
            string outputFile,
            string code)
        {
            sut.OutputFile = outputFile;

            Mock.Get(generator)
            .Setup(c => c.GenerateCode(progressReporter))
            .Returns(code);

            new Func <int>(sut.OnExecute).Should().NotThrow();
        }
 public void CreateGenerator_Should_NotNull(NSwagCommand sut)
 => sut.CreateGenerator().Should().NotBeNull();
 public void OutputFile_Should_NotBeNullOrWhiteSpace(NSwagCommand sut)
 => sut.OutputFile.Should().NotBeNullOrWhiteSpace();
 public void SwaggerFile_Should_NotBeNullOrWhiteSpace(NSwagCommand sut)
 => sut.SwaggerFile.Should().NotBeNullOrWhiteSpace();
 public void DefaultNamespace_Should_NotBeNullOrWhiteSpace(NSwagCommand sut)
 => sut.DefaultNamespace.Should().NotBeNullOrWhiteSpace();