public void TestAddGetRoutesToServer()
        {
            HttpServer     server     = new HttpServer(9999);
            TestController controller = new TestController();

            AutoRouter.AddControllerActions(controller, server);

            Assert.IsTrue(server.Get["/Test/PingWithStringResponse"].Method.Name == "PingWithStringResponse");
        }
示例#2
0
 static void Main(string[] args)
 {
     if (args.Length != 1)
     {
         Console.Error.WriteLine("Usage: AutoRoute <path to OpenCPN navobj.xml>");
         Environment.Exit(1);
     }
     else
     {
         AutoRouter autoRouter = new AutoRouter();
         autoRouter.MakeRoutes(args[0]);
         Environment.Exit(0);
     }
 }