public void Should_parse_multiple_assembly_options_into_AssemblyPaths() { var options = new Options("-a=foo", "-a=bar"); Assert.That(options.AssemblyPaths.Count, Is.EqualTo(2)); Assert.That(options.AssemblyPaths.Contains("foo")); Assert.That(options.AssemblyPaths.Contains("bar")); }
static void Main(string[] args) { var options = new Options(args); var loader = new Loader(options.AssemblyPaths); var processor = new Processor(loader); var listener = new Listener(processor, options.Port); new NukeServer(listener, Console.Out, options).Start(); }
static void Main(string[] args) { var options = new Options(args); var objectFactory = new ObjectFactory(); var loader = new Loader(options.AssemblyPaths, objectFactory); var processor = new Processor(loader, objectFactory); var listener = new Listener(processor, options.Port); log4net.Config.XmlConfigurator.Configure(); new NukeServer(listener, options).Start(); }
public void Should_parse_p_into_port() { var options = new Options("-p=1234"); Assert.That(options.Port, Is.EqualTo(1234)); }
public void Should_parse_minus_d_as_wait_for_debuger() { var options = new Options("-d"); Assert.That(options.WaitForDebuger); }
public void Should_parse_h_into_ShowHelp() { var options = new Options("-h"); Assert.That(options.ShowHelp, Is.True); }
public void Should_parse_a_into_AssemblyPaths() { var options = new Options("-a=foo"); Assert.That(options.AssemblyPaths.Count, Is.EqualTo(1)); Assert.That(options.AssemblyPaths.Contains("foo")); }
public void Shold_not_set_wait_for_debuger_with_explicit_notice() { var options = new Options(); Assert.That(options.WaitForDebuger, Is.False); }
public void Port_should_default_correctly() { var options = new Options(""); Assert.That(options.Port, Is.EqualTo(Options.DefaultPort)); }
public void AssemblyPaths_should_default_to_empty_collection() { var options = new Options(""); Assert.That(options.AssemblyPaths.Count, Is.EqualTo(0)); }
public void Write_should_write_options_label_line() { var output = new StringWriter(); var options = new Options(); options.Write(output); Assert.That(output.ToString().StartsWith("Options:" + Environment.NewLine)); }
public void Write_should_write_options_label_lin() { var options = new Options(); options.Write(Console.Out); }
public void ShowHelp_should_default_to_false() { var options = new Options(""); Assert.That(options.ShowHelp, Is.False); }
public NukeServer(Listener listner, Options options, IDebugerCommand debuggerCommand) { _listener = listner; _options = options; _debugerCommand = debuggerCommand; }
public NukeServer(Listener listener, Options options) { _listener = listener; _options = options; _debugerCommand = new DebugerCommand(); }
public NukeServer(Listener listener, TextWriter output, Options options) { _listener = listener; _options = options; _output = output; }