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); } }
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); } }