示例#1
0
        public void CheckIfFileName_IsValid(string fileName, bool answer)
        {
            // Act
            bool isValid = FileExts.IsFileNameValid(fileName);

            // Assert
            Assert.AreEqual(answer, isValid);
        }
示例#2
0
        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));
        }