Exemplo n.º 1
0
        public void GetFileName_WithoutDirectory()
        {
            // Declare variables
            string input          = @"notepad.exe";
            string expectedOutput = "notepad.exe";

            // Call method
            string output = Path.GetFileName(input);

            // Check result
            Assert.AreEqual(expectedOutput, output);
        }
Exemplo n.º 2
0
 public void GetFileName_EmptyInput()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.GetFileName(null));
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => Path.GetFileName(string.Empty));
 }