MovieConccersionExtensionTests - use DataRow and add more scenarios

This commit is contained in:
adelikat 2020-06-05 13:06:45 -05:00
parent bf5aca721e
commit 8b5e0ae8fd
1 changed files with 8 additions and 5 deletions

View File

@ -6,13 +6,16 @@ namespace BizHawk.Common.Tests.Client.Common.Movie
[TestClass]
public class MovieConversionExtensionTests
{
private string oldBk2FileName = "C:\\Temp\\TestMovie.bk2";
[TestMethod]
public void GetNewFileNameFromBk2()
[DataRow(null, null)]
[DataRow("", "")]
[DataRow("C:\\Temp\\TestMovie.bk2", "C:\\Temp\\TestMovie.tasproj")]
[DataRow("C:\\Temp\\TestMovie.tasproj.bk2", "C:\\Temp\\TestMovie.tasproj.tasproj")]
[DataRow("C:\\Temp\\TestMovie.tasproj", "C:\\Temp\\TestMovie.tasproj")]
public void GetNewFileNameFromBk2(string original, string expected)
{
var actual = MovieConversionExtensions.GetNewFileName(oldBk2FileName);
Assert.AreEqual("C:\\Temp\\TestMovie.tasproj", actual);
var actual = MovieConversionExtensions.GetNewFileName(original);
Assert.AreEqual(expected, actual);
}
}
}