mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add IOExtensions tests
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|||||||
24
SabreTools.Test/IO/IOExtensionsTests.cs
Normal file
24
SabreTools.Test/IO/IOExtensionsTests.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using SabreTools.IO;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace SabreTools.Test.IO
|
||||||
|
{
|
||||||
|
public class IOExtensionsTests
|
||||||
|
{
|
||||||
|
[Theory]
|
||||||
|
[InlineData(null, null)]
|
||||||
|
[InlineData("", null)]
|
||||||
|
[InlineData(" ", null)]
|
||||||
|
[InlineData("no-extension", null)]
|
||||||
|
[InlineData("NO-EXTENSION", null)]
|
||||||
|
[InlineData("no-extension.", null)]
|
||||||
|
[InlineData("NO-EXTENSION.", null)]
|
||||||
|
[InlineData("filename.ext", "ext")]
|
||||||
|
[InlineData("FILENAME.EXT", "ext")]
|
||||||
|
public void NormalizedExtensionTest(string path, string expected)
|
||||||
|
{
|
||||||
|
string actual = path.GetNormalizedExtension();
|
||||||
|
Assert.Equal(expected, actual);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user