public void GetDoPrintStreamShouldReturnConsoleWhenNotGivenFinalScriptFile() { var printScreenFactory = new PrintScreenFactory(); var parsedArguments = new ParsedArguments(); TextWriter results = printScreenFactory.GetDoPrintStream(parsedArguments); Assert.That(results, Is.EqualTo(System.Console.Out)); printScreenFactory.ClosePrintStream(results); }
public void GetDoPrintStreamShouldReturnConsoleWhenNotGivenFinalScriptFile() { var printScreenFactory = new PrintScreenFactory(); var parsedArguments = new ParsedArguments(); TextWriter results = printScreenFactory.GetDoPrintStream(parsedArguments); Assert.That(results, Is.EqualTo(System.Console.Out)); printScreenFactory.ClosePrintStream(results); }
public void GetDoPrintStreamShouldReturnFileWriterWhenGivenFinalScriptFile() { var printScreenFactory = new PrintScreenFactory(); var parsedArguments = new ParsedArguments(); parsedArguments.SetValue(CommandlineSwitchType.DoFile, "c:\\temp\\foo.sql"); TextWriter results = printScreenFactory.GetDoPrintStream(parsedArguments); Assert.That(results, Is.TypeOf<StreamWriter>()); printScreenFactory.ClosePrintStream(results); }
public void GetDoPrintStreamShouldReturnFileWriterWhenGivenFinalScriptFile() { var printScreenFactory = new PrintScreenFactory(); var parsedArguments = new ParsedArguments(); parsedArguments.SetValue(CommandlineSwitchType.DoFile, "c:\\temp\\foo.sql"); TextWriter results = printScreenFactory.GetDoPrintStream(parsedArguments); Assert.That(results, Is.TypeOf <StreamWriter>()); printScreenFactory.ClosePrintStream(results); }