public void IsValidFileNameInvalidTest() { using (TileGeneratorViewModel_Accessor target = new TileGeneratorViewModel_Accessor()) { string fileName = Environment.CurrentDirectory + @"\Image\<>fff.Png"; bool expected = false; bool actual; actual = target.IsValidFileName(fileName); Assert.AreEqual(expected, actual); Assert.AreEqual(Properties.Resources.OutputFilenameInvalidCharacterError, target.InvalidOutputFileNameErrorMessage); } }
public void IsValidFileNameEmptyTest() { using (TileGeneratorViewModel_Accessor target = new TileGeneratorViewModel_Accessor()) { string fileName = string.Empty; bool expected = false; bool actual; actual = target.IsValidFileName(fileName); Assert.AreEqual(expected, actual); Assert.AreEqual(Properties.Resources.MandatoryError, target.InvalidOutputFileNameErrorMessage); } }
public void IsValidFileNameTest() { using (TileGeneratorViewModel_Accessor target = new TileGeneratorViewModel_Accessor()) { string fileName = "L0X0Y0.Png"; bool expected = true; bool actual; actual = target.IsValidFileName(fileName); Assert.AreEqual(expected, actual); Assert.AreEqual(string.Empty, target.InvalidOutputFileNameErrorMessage); } }