public void TestFileNameConstructorInvalidFile()
{
bool threw = false;
try
{
new Config("NotThere.config", VALID_APPNAME);
}
catch (Exception e)
{
threw = true;
Assert.IsTrue(e.Message.Contains(VALID_APPNAME), "Exception didn't contain the appName");
Assert.IsTrue(e.Message.Contains("NotThere.config"), "Exception didn't contain the file name");
}
if (!threw)
{
Assert.Fail("Failed to throw an exception when given an invalid filename.");
}
}