public void OnExecuteAsync_Should_NotThrow( [Frozen] IProgressReporter progressReporter, [Frozen] ICodeGenerator generator, SwaggerCodegenCommand sut, string code) { Mock.Get(generator) .Setup(c => c.GenerateCode(progressReporter)) .Returns(code); new Func <int>(sut.OnExecute).Should().NotThrow(); }
public void OnExecuteAsync_Should_NotThrow( IConsoleOutput console, IProgressReporter progressReporter, IProcessLauncher processLauncher, IGeneralOptions options, ISwaggerCodegenFactory codeGeneratorFactory, ICodeGenerator generator, string code) { var sut = new SwaggerCodegenCommand( console, progressReporter, options, processLauncher, codeGeneratorFactory); Mock.Get(generator) .Setup(c => c.GenerateCode(progressReporter)) .Returns(code); new Func <int>(sut.OnExecute).Should().NotThrow(); }
public void CreateGenerator_Should_NotNull(SwaggerCodegenCommand sut) => sut.CreateGenerator().Should().NotBeNull();
public void OutputFile_Should_NotBeNullOrWhiteSpace(SwaggerCodegenCommand sut) => sut.OutputFile.Should().NotBeNullOrWhiteSpace();
public void DefaultNamespace_Should_NotBeNullOrWhiteSpace(SwaggerCodegenCommand sut) => sut.DefaultNamespace.Should().NotBeNullOrWhiteSpace();