/[gr2lib]/trunk/gr2lib_UnitTest/Program.cs
ViewVC logotype

Diff of /trunk/gr2lib_UnitTest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_UnitTest/Program.cs	2010/07/15 08:29:13	61
+++ trunk/gr2lib_UnitTest/Program.cs	2010/07/15 08:37:02	65
@@ -13,6 +13,7 @@
     {
         static void Main(string[] args)
         {
+            string GrannyFilename = shared.GRANNY_TEST_FILE;
             try
             {
                 // Setup access to check loaded Granny2 API Version
@@ -33,9 +34,23 @@
                     // the loaded version matches
                     Console.WriteLine("Loaded granny2.dll: " + apiversion.apiversion.version);
                 }
-                // if we have arrived at this point, the loaded api version matches the what the library was built against
+                
+                // parse commandline
+                if (args.Length == 2)
+                {
+                    GrannyFilename = args[1];
+                }
 
+                if (System.IO.File.Exists(GrannyFilename))
+                {
+                    Console.WriteLine("Using Granny2 File: " + GrannyFilename);
+                }
+                else
+                {
+                    throw new System.IO.FileNotFoundException("Unable to find: " + GrannyFilename);
+                }
 
+                
 
 
             }

 

  ViewVC Help
Powered by ViewVC 1.1.22