public void CheckIfFileName_IsValid(string fileName, bool answer) { // Act bool isValid = FileExts.IsFileNameValid(fileName); // Assert Assert.AreEqual(answer, isValid); }
public void ConvertFileName_ToSafeFileName_ShouldPass_IsValidFileNameTest(string invalidFileName) { // Act string validFileName = FileExts.ToSafeFileName(invalidFileName); // Assert Assert.IsNotNull(validFileName); Assert.IsFalse(FileExts.IsFileNameValid(invalidFileName)); Assert.IsTrue(FileExts.IsFileNameValid(validFileName)); }