From 8b5e0ae8fded72d43811795049718c0c4630333b Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 5 Jun 2020 13:06:45 -0500 Subject: [PATCH] MovieConccersionExtensionTests - use DataRow and add more scenarios --- .../Movie/MovieConversionExtensionTests.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/BizHawk.Tests/Client.Common/Movie/MovieConversionExtensionTests.cs b/src/BizHawk.Tests/Client.Common/Movie/MovieConversionExtensionTests.cs index 7010ed6513..d4b1e0698b 100644 --- a/src/BizHawk.Tests/Client.Common/Movie/MovieConversionExtensionTests.cs +++ b/src/BizHawk.Tests/Client.Common/Movie/MovieConversionExtensionTests.cs @@ -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); } } } \ No newline at end of file