コード例 #1
0
 public void InvalidCommandLineTooManyArgsTest()
 {
     try
     {
         GenerateCsvMatrixFromOD.Main(new [] { "arg1", "arg2" });
         Assert.Fail("Expected exception to be thrown");
     }
     catch (Exception e)
     {
         Assert.AreEqual("Command line format: <layer file name>", e.Message);
     }
 }
コード例 #2
0
        public void InvalidCommandLineNoLayerTest()
        {
            const string layerFile = @"c:\temp\Nope.lyr";

            try
            {
                GenerateCsvMatrixFromOD.Main(new[] { layerFile });
                Assert.Fail("Expected exception to be thrown");
            }
            catch (Exception e)
            {
                Assert.AreEqual($"Layer file does not exist: {layerFile}", e.Message);
            }
        }