Esempio n. 1
0
 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"));
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
 public void Should_parse_p_into_port()
 {
     var options = new Options("-p=1234");
     Assert.That(options.Port, Is.EqualTo(1234));
 }
Esempio n. 5
0
 public void Should_parse_minus_d_as_wait_for_debuger()
 {
     var options = new Options("-d");
     Assert.That(options.WaitForDebuger);
 }
Esempio n. 6
0
 public void Should_parse_h_into_ShowHelp()
 {
     var options = new Options("-h");
     Assert.That(options.ShowHelp, Is.True);
 }
Esempio n. 7
0
 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"));
 }
Esempio n. 8
0
 public void Shold_not_set_wait_for_debuger_with_explicit_notice()
 {
     var options = new Options();
     Assert.That(options.WaitForDebuger, Is.False);
 }
Esempio n. 9
0
 public void Port_should_default_correctly()
 {
     var options = new Options("");
     Assert.That(options.Port, Is.EqualTo(Options.DefaultPort));
 }
Esempio n. 10
0
 public void AssemblyPaths_should_default_to_empty_collection()
 {
     var options = new Options("");
     Assert.That(options.AssemblyPaths.Count, Is.EqualTo(0));
 }
Esempio n. 11
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));
 }
Esempio n. 12
0
 public void Write_should_write_options_label_lin()
 {
     var options = new Options();
     options.Write(Console.Out);
 }
Esempio n. 13
0
 public void ShowHelp_should_default_to_false()
 {
     var options = new Options("");
     Assert.That(options.ShowHelp, Is.False);
 }
Esempio n. 14
0
 public NukeServer(Listener listner, Options options, IDebugerCommand debuggerCommand)
 {
     _listener = listner;
     _options = options;
     _debugerCommand = debuggerCommand;
 }
Esempio n. 15
0
 public NukeServer(Listener listener, Options options)
 {
     _listener = listener;
     _options = options;
     _debugerCommand = new DebugerCommand();
 }
Esempio n. 16
0
 public NukeServer(Listener listener, TextWriter output, Options options)
 {
     _listener = listener;
     _options = options;
     _output = output;
 }