diff --git a/src/PAModelTests/AppTestsTest.cs b/src/PAModelTests/AppTestsTest.cs index 523ca9a8..adf6a3b8 100644 --- a/src/PAModelTests/AppTestsTest.cs +++ b/src/PAModelTests/AppTestsTest.cs @@ -12,7 +12,7 @@ namespace PAModelTests; public class AppTestsTest { // Validates that the App can be repacked after deleting the EditorState files, when the app contains app tests which refer to screens. - [DataTestMethod] + [TestMethod] [DataRow("TestStudio_Test.msapp")] public void TestPackWhenEditorStateIsDeleted(string appName) { @@ -48,7 +48,7 @@ public void TestPackWhenEditorStateIsDeleted(string appName) } // Validates that the App can be repacked after deleting the Entropy files, when the app contains app tests which refer to screens. - [DataTestMethod] + [TestMethod] [DataRow("TestStudio_Test.msapp")] public void TestPackWhenEntropyIsDeleted(string appName) { diff --git a/src/PAModelTests/ChecksumTests.cs b/src/PAModelTests/ChecksumTests.cs index b0ec7e91..64499dda 100644 --- a/src/PAModelTests/ChecksumTests.cs +++ b/src/PAModelTests/ChecksumTests.cs @@ -11,7 +11,7 @@ namespace PAModelTests; [TestClass] public class ChecksumTests { - [DataTestMethod] + [TestMethod] [DataRow("MyWeather.msapp", "C8_ZXZwZAG3P0lmCkNAGjsIjYb503akWCyudsk8DEi2aX0=", 11, "References\\DataSources.json", "C8_2dpVudcymwNaHoHtQugF1MSpzsY1I6syuPiB0B+jTYc=")] public void TestChecksum(string filename, string expectedChecksum, int expectedFileCount, string file, string innerExpectedChecksum) { @@ -29,7 +29,7 @@ public void TestChecksum(string filename, string expectedChecksum, int expectedF Assert.AreEqual(ChecksumMaker.GetChecksumVersion(expectedChecksum), ChecksumMaker.Version); } - [DataTestMethod] + [TestMethod] [DataRow("a bc", "a bc")] [DataRow(" a b ", "a b")] // leading, trailing [DataRow("a\t\r\nb", "a b")] // other chars @@ -80,7 +80,7 @@ public void ChecksumsUnique() private const string C20 = "C8_2YUFpLVLEYtdFvV9iLN8F6TM+cWczemMx4m0VEIpfrg="; - [DataTestMethod] + [TestMethod] [DataRow(C1, /*lang=json*/ @"' ab\r\ncd'")] // whitespace [DataRow(C1, /*lang=json*/ @"'ab\ncd'")] // same [DataRow(C2, /*lang=json*/ @"'ab\ncd '")] // Trailing whitespace is not trimmed. diff --git a/src/PAModelTests/DataSourceTests.cs b/src/PAModelTests/DataSourceTests.cs index e22f8783..520b389b 100644 --- a/src/PAModelTests/DataSourceTests.cs +++ b/src/PAModelTests/DataSourceTests.cs @@ -17,7 +17,7 @@ namespace PAModelTests; public class DataSourceTests { // Validates that the TableDefinitions are being added at the end of the DataSources.json when the entropy file is deleted. - [DataTestMethod] + [TestMethod] [DataRow("GalleryTestApp.msapp")] [DataRow("AccountPlanReviewerMaster.msapp")] public void TestTableDefinitionsAreLastEntriesWhenEntropyDeleted(string appName) @@ -78,7 +78,7 @@ public void TestTableDefinitionsAreLastEntriesWhenEntropyDeleted(string appName) } } - [DataTestMethod] + [TestMethod] [DataRow("EmptyLocalDBRefsHashMismatchProperties.msapp")] public void TestNoLocalDatabaseRefsWhenLocalDatabaseReferencesPropertyWasEmptyJson(string appName) { @@ -98,7 +98,7 @@ public void TestNoLocalDatabaseRefsWhenLocalDatabaseReferencesPropertyWasEmptyJs Assert.IsTrue(loadedMsApp._dataSourceReferences.Count == 0); } - [DataTestMethod] + [TestMethod] [DataRow("EmptyLocalDBRefsHashMismatchProperties.msapp")] public void TestConnectionInstanceIDHandling(string appName) { @@ -117,7 +117,7 @@ public void TestConnectionInstanceIDHandling(string appName) errorsCaptured.ThrowOnErrors(); } - [DataTestMethod] + [TestMethod] [DataRow("MultipleDataSourcesWithOneUnused.msapp")] public void TestUnusedDataSourcesArePreserved(string appName) { @@ -152,7 +152,7 @@ public void TestUnusedDataSourcesArePreserved(string appName) } } - [DataTestMethod] + [TestMethod] [DataRow("MultipleDataSourcesWithOneUnused.msapp")] public void TestUnusedDataSourcesAreNotPreservedWhenNotTracked(string appName) { @@ -187,7 +187,7 @@ public void TestUnusedDataSourcesAreNotPreservedWhenNotTracked(string appName) } } - [DataTestMethod] + [TestMethod] [DataRow("MultipleDataSourcesWithOneUnused.msapp")] public void TestWhenDataSourcesAreNotPresent(string appName) { @@ -213,7 +213,7 @@ public void TestWhenDataSourcesAreNotPresent(string appName) Assert.IsNull(msApp._dataSourceReferences.First().Value.dataSources); } - [DataTestMethod] + [TestMethod] [DataRow("MultipleDataSourcesWithOneUnused.msapp")] public void TestWhenDataSourcesIsSetToEmptyDictionary(string appName) { @@ -238,7 +238,7 @@ public void TestWhenDataSourcesIsSetToEmptyDictionary(string appName) Assert.AreEqual(msApp._dataSourceReferences.First().Value.dataSources.Count, 0); } - [DataTestMethod] + [TestMethod] [DataRow("NoUnusedDataSources.msapp")] public void TestAllUsedDataSourcesArePreserved(string appName) { @@ -262,7 +262,7 @@ public void TestAllUsedDataSourcesArePreserved(string appName) } } - [DataTestMethod] + [TestMethod] [DataRow(new string[] { "FileNameOne.txt" }, ".txt")] [DataRow(new string[] { "FileNameTwo.tx /// Tests that the top parent name is set properly on the editor state file. /// - [DataTestMethod] + [TestMethod] [DataRow("AppWithLabel.msapp", "Screen1")] [DataRow("DuplicateScreen.msapp", "Screen1")] public void TestTopParentSerialization(string appName, string topParentName) @@ -57,7 +57,7 @@ public void TestTopParentSerialization(string appName, string topParentName) /// Tests that the `TopParentName` for each control is set to the correct /// value when the app is deserialized. /// - [DataTestMethod] + [TestMethod] [DataRow("AppWithLabel.msapp", "Screen1")] [DataRow("DuplicateScreen.msapp", "Screen1")] public void TestTopParentNameLoad(string appName, string topParentName) @@ -118,7 +118,7 @@ public void TestTopParentNameLoad(string appName, string topParentName) /// /// When SourceSerializer is updated past v24, this could be removed entirely. /// - [DataTestMethod] + [TestMethod] [DataRow("AppWithLabel.msapp", "Screen1")] [DataRow("DuplicateScreen.msapp", "Screen1")] public void TestTopParentNameFallback(string appName, string topParentName) diff --git a/src/PAModelTests/EntropyTests.cs b/src/PAModelTests/EntropyTests.cs index e9097ef0..6c33f2d9 100644 --- a/src/PAModelTests/EntropyTests.cs +++ b/src/PAModelTests/EntropyTests.cs @@ -11,7 +11,7 @@ namespace PAModelTests; [TestClass] public class EntropyTests { - [DataTestMethod] + [TestMethod] [DataRow("ComponentTest.msapp", true)] [DataRow("ComponentWithSameParam.msapp", false)] public void TestFunctionParameters(string filename, bool invariantScriptsOnInstancesExist) @@ -38,7 +38,7 @@ public void TestFunctionParameters(string filename, bool invariantScriptsOnInsta } } - [DataTestMethod] + [TestMethod] [DataRow("AnimationControlIdIsGuid.msapp")] public void TestControlIdGuidParsing(string filename) { @@ -52,7 +52,7 @@ public void TestControlIdGuidParsing(string filename) Assert.AreEqual(msapp._entropy.ControlUniqueIds.Count, 0); } - [DataTestMethod] + [TestMethod] [DataRow("AppWithLabel.msapp")] public void TestControlIdIntParsing(string filename) { @@ -68,7 +68,7 @@ public void TestControlIdIntParsing(string filename) // Validate that the control template fields OverridaleProperties and PCFDynamicSchemaForIRRetrieval are stored in entropy while unpacking // The test app contains control instances with same template but different fields - [DataTestMethod] + [TestMethod] [DataRow("ControlInstancesWithDifferentTemplateFields.msapp")] public void TestControlInstancesWithSameTemplateDifferentFields(string appName) { @@ -82,7 +82,7 @@ public void TestControlInstancesWithSameTemplateDifferentFields(string appName) Assert.IsTrue(msapp._entropy.PCFDynamicSchemaForIRRetrievalEntry.Count > 0); } - [DataTestMethod] + [TestMethod] [DataRow("AnimationControlIdIsGuid.msapp")] public void TestGetResourcesJSONIndicesKeyNullException(string filename) { @@ -100,7 +100,7 @@ public void TestGetResourcesJSONIndicesKeyNullException(string filename) // Validate that the pcf control template is stored in entropy while unpacking // The test app contains control instances with same template but different fields - [DataTestMethod] + [TestMethod] [DataRow("PcfTemplates.msapp")] public void TestPCFControlInstancesWithSameTemplateDifferentFields(string appName) { @@ -113,7 +113,7 @@ public void TestPCFControlInstancesWithSameTemplateDifferentFields(string appNam Assert.IsTrue(msapp._entropy.PCFTemplateEntry.Count > 0); } - [DataTestMethod] + [TestMethod] [DataRow("AnimationControlIdIsGuid.msapp")] public void TestAppWithNoPCFControlInstances(string appName) { @@ -128,7 +128,7 @@ public void TestAppWithNoPCFControlInstances(string appName) // Validate that a PCF control will still resolve its template by falling back to // the template store if the control's specific template isn't in Entropy. - [DataTestMethod] + [TestMethod] [DataRow("PcfTemplates.msapp")] public void TestPCFControlWillFallBackToControlTemplate(string appName) { diff --git a/src/PAModelTests/JsonNormalizerTests.cs b/src/PAModelTests/JsonNormalizerTests.cs index 97da636d..4f4ac7c6 100644 --- a/src/PAModelTests/JsonNormalizerTests.cs +++ b/src/PAModelTests/JsonNormalizerTests.cs @@ -21,7 +21,7 @@ public void Test() } // String escaping normalizing. \u is an escape, Multiple ways to encode the same char. - [DataTestMethod] + [TestMethod] [DataRow("\"a\\\"bc\"")] [DataRow("\"a\\u0022bc\"")] public void StringEncoding(string unescaped) diff --git a/src/PAModelTests/NameCollisionTests.cs b/src/PAModelTests/NameCollisionTests.cs index e6246eb8..c3bff9e9 100644 --- a/src/PAModelTests/NameCollisionTests.cs +++ b/src/PAModelTests/NameCollisionTests.cs @@ -62,7 +62,7 @@ public void TestAssetFileRename() Assert.IsTrue(newFileNames.Contains("image_2")); } - [DataTestMethod] + [TestMethod] [DataRow("AppWithLabel.msapp")] [DataRow("DuplicateScreen.msapp")] public void TestScreenRename(string appName) @@ -115,7 +115,7 @@ public void TestScreenRename(string appName) } } - [DataTestMethod] + [TestMethod] [DataRow("AppWithLabel.msapp")] [DataRow("DuplicateScreen.msapp")] [DataRow("ComponentNameCollision.msapp")] @@ -205,7 +205,7 @@ public void TestAssetPathCollision() Assert.IsFalse(errorContainer.HasErrors); } - [DataTestMethod] + [TestMethod] [DataRow("CollidingFilenames.msapp")] public void TestDataSourceNameCollision(string appName) { diff --git a/src/PAModelTests/ParserTests.cs b/src/PAModelTests/ParserTests.cs index 31ce042e..bb8bd943 100644 --- a/src/PAModelTests/ParserTests.cs +++ b/src/PAModelTests/ParserTests.cs @@ -8,7 +8,7 @@ namespace PAModelTests; [TestClass] public class ParserTests { - [DataTestMethod] + [TestMethod] [DataRow("Foo", true, "Foo", 3)] [DataRow("'Foo'", true, "Foo", 5)] [DataRow("'Foo Bar'", true, "Foo Bar", 9)] @@ -26,7 +26,7 @@ public void TestParseIdent(string input, bool shouldParse, string output, int ex Assert.AreEqual(expectedLength, length); } - [DataTestMethod] + [TestMethod] [DataRow("Foo As Bar", true, "Foo", "Bar", null)] [DataRow("Foo As Bar.Baz", true, "Foo", "Bar", "Baz")] [DataRow("'escaped foo' As Bar", true, "escaped foo", "Bar", null)] diff --git a/src/PAModelTests/ReadTransformTests.cs b/src/PAModelTests/ReadTransformTests.cs index ceff8c14..23e15860 100644 --- a/src/PAModelTests/ReadTransformTests.cs +++ b/src/PAModelTests/ReadTransformTests.cs @@ -11,7 +11,7 @@ namespace PAModelTests; [TestClass] public class ReadTransformTests { - [DataTestMethod] + [TestMethod] [DataRow("GalleryTemplateNullChildren.msapp", false, false)] [DataRow("TestStepWithInvalidScreen.msapp", false, true)] [DataRow("GroupControlStateEmpty.msapp", false, true)] diff --git a/src/PAModelTests/SourceDecoderTests.cs b/src/PAModelTests/SourceDecoderTests.cs index 4ac35f28..0164527a 100644 --- a/src/PAModelTests/SourceDecoderTests.cs +++ b/src/PAModelTests/SourceDecoderTests.cs @@ -14,7 +14,7 @@ public class SourceDecoderTests // Compare actual source output. This catches things like: // - are we removing default properties, from both Theme Json and Template xmL? // - canonical ordering and stable output - [DataTestMethod] + [TestMethod] [DataRow("MyWeather.msapp", "", "Screen1.fx.yaml", "Weather_Screen1.fx.yaml")] [DataRow("GroupControlTest.msapp", "", "Screen1.fx.yaml", "GroupControl_Test.fx.yaml")] [DataRow("GalleryTestApp.msapp", "", "Screen1.fx.yaml", "Gallery_ScreenTest.fx.yaml")] diff --git a/src/PAModelTests/TemplateStoreTests.cs b/src/PAModelTests/TemplateStoreTests.cs index b7be16db..5e32d90b 100644 --- a/src/PAModelTests/TemplateStoreTests.cs +++ b/src/PAModelTests/TemplateStoreTests.cs @@ -15,7 +15,7 @@ public class TemplateStoreTests { // Validate that the host control template hostType value is stored in entropy while unpacking // This example app has different host control instances with different template values like HostType - [DataTestMethod] + [TestMethod] [DataRow("SharepointAppWithHostControls.msapp")] public void TestHostControlInstancesWithHostType(string appName) { @@ -48,7 +48,7 @@ public void TestHostControlInstancesWithHostType(string appName) // Validate a modern control that has a dynamic template. // The template has a valid template name, but makes reference to another template. // This example app has two modern controls (combobox and dropdown) that make reference to the same template. - [DataTestMethod] + [TestMethod] [DataRow("ComboboxDropdown.msapp")] public void TestModernControlWithDynamicTemplate(string appName) { diff --git a/src/PAModelTests/UtilityTests.cs b/src/PAModelTests/UtilityTests.cs index 77bd6d31..a986c89d 100644 --- a/src/PAModelTests/UtilityTests.cs +++ b/src/PAModelTests/UtilityTests.cs @@ -9,7 +9,7 @@ namespace PAModelTests; [TestClass] public class UtilityTests { - [DataTestMethod] + [TestMethod] [DataRow("\r\t!$^%/\\", "%0d%09%21%24%5e%25%2f%5c")] [DataRow("одиндваодиндваодиндваодиндваодиндваодинд", "одиндваодиндваодиндваодиндваодиндваодинд")] [DataRow("İkşzlerAçık芲偁ABC巢für नमस्ते กุ้งจิ้яЧчŠš������ - Copy (2).jpg", "İkşzlerA%e7ık芲偁ABC巢f%fcr नमस्ते กุ้งจิ้яЧчŠš������ - Copy %282%29.jpg")] @@ -19,7 +19,7 @@ public void TestEscaping(string unescaped, string escaped) Assert.AreEqual(FilePath.UnEscapeFilename(escaped), unescaped); } - [DataTestMethod] + [TestMethod] [DataRow("foo-%41", "foo-A")] [DataRow("[]_' ", "[]_' ")] // unescape only touches % character. [DataRow("İkşzlerA%e7ık芲偁ABC巢f%fcr नमस्ते กุ้งจิ้яЧчŠš������ - Copy %282%29.jpg", "İkşzlerAçık芲偁ABC巢für नमस्ते กุ้งจิ้яЧчŠš������ - Copy (2).jpg")] @@ -36,7 +36,7 @@ public void TestNotEscaped() Assert.AreEqual(FilePath.EscapeFilename(a), a); } - [DataTestMethod] + [TestMethod] [DataRow("C:\\Foo\\Bar\\file", "C:\\Foo", "Bar\\file")] [DataRow("C:\\Foo\\Bar\\file", "C:\\Foo\\", "Bar\\file")] [DataRow("C:\\Foo\\Bar.msapp", "C:\\Foo", "Bar.msapp")] @@ -74,7 +74,7 @@ public void Regression153() Assert.AreEqual(path, original); } - [DataTestMethod] + [TestMethod] [DataRow("Long*Control*Name*Truncation*Tests***", "Long%2aControl%2aName%2aTruncation%2aTests%2a_959")] [DataRow("TestReallyLoooooooooooooooooooooooooooooooooooongControlName", "TestReallyLooooooooooooooooooooooooooooooooooo_cad")] [DataRow("TestControlName", "TestControlName")] diff --git a/src/PAModelTests/WriteTransformTests.cs b/src/PAModelTests/WriteTransformTests.cs index 88c62b8c..8a72c868 100644 --- a/src/PAModelTests/WriteTransformTests.cs +++ b/src/PAModelTests/WriteTransformTests.cs @@ -12,7 +12,7 @@ namespace PAModelTests; [TestClass] public class WriteTransformTests { - [DataTestMethod] + [TestMethod] [DataRow("EmptyTestCase.msapp")] public void TestResourceNullCase(string filename) { @@ -29,7 +29,7 @@ public void TestResourceNullCase(string filename) Assert.IsFalse(errors.HasErrors); } - [DataTestMethod] + [TestMethod] [DataRow("AccountPlanReviewerMaster.msapp")] public void TestAssetFilesNullCase(string filename) { @@ -46,7 +46,7 @@ public void TestAssetFilesNullCase(string filename) Assert.IsFalse(errors.HasErrors); } - [DataTestMethod] + [TestMethod] [DataRow("AccountPlanReviewerMaster.msapp")] public void TestResourcesInResourcesJsonIsNullWhenRestoringAssetFilePaths(string filename) { @@ -62,7 +62,7 @@ public void TestResourcesInResourcesJsonIsNullWhenRestoringAssetFilePaths(string Assert.IsFalse(errors.HasErrors); } - [DataTestMethod] + [TestMethod] [DataRow("AccountPlanReviewerMaster.msapp")] public void TestNullExceptionInRestoreAssetsFilePathsIsLoggedAsAnInternalError(string filename) { @@ -81,7 +81,7 @@ public void TestNullExceptionInRestoreAssetsFilePathsIsLoggedAsAnInternalError(s Assert.IsNotNull(errors.FirstOrDefault(error => error.Code == ErrorCode.InternalError)); } - [DataTestMethod] + [TestMethod] [DataRow("AccountPlanReviewerMaster.msapp")] public void TestNullExceptionInGetMsAppFilesIsLoggedAsAnInternalError(string filename) { diff --git a/src/PAModelTests/YamlTest.cs b/src/PAModelTests/YamlTest.cs index eaf9b290..6db93805 100644 --- a/src/PAModelTests/YamlTest.cs +++ b/src/PAModelTests/YamlTest.cs @@ -39,7 +39,7 @@ public void Write1() } // These values should get automatically multiline escaped. - [DataTestMethod] + [TestMethod] [DataRow("Hi #There")] // Yaml comments are dangerous [DataRow("abc\r\ndef")] [DataRow("Patched({a : b})")] @@ -57,7 +57,7 @@ public void WriteEscapes(string value) } // Different ending newlines will have different escapes. - [DataTestMethod] + [TestMethod] [DataRow(" 1")] // leading whitespace [DataRow(" 1\n2\n3")] // leading whitespace with multiline [DataRow(" 1\r2\r3")] // leading whitespace with Mac style multiline @@ -107,7 +107,7 @@ public void NewLinesRoundtrip(string value) } - [DataTestMethod] + [TestMethod] [DataRow(true)] [DataRow(false)] public void WriteBool(bool value) @@ -155,7 +155,7 @@ private static string NormNewlines(string x) } // Error on 1st token read - [DataTestMethod] + [TestMethod] [DataRow("Foo: 12")] // missing = [DataRow("Foo: |\r\n=12")] // missing = in newline [DataRow("Foo: =x #comment")] // comments not allowed in single line. @@ -173,7 +173,7 @@ public void ExpectedError(string expr) } // Error on 2nd token read. - [DataTestMethod] + [TestMethod] [DataRow("Foo:\r\n val\r\n")] // Must have escape if there's a newline public void ExpectedError2(string expr) { diff --git a/src/Persistence.Tests/MsApp/MsappArchiveTests.cs b/src/Persistence.Tests/MsApp/MsappArchiveTests.cs index ee6d47db..730ea546 100644 --- a/src/Persistence.Tests/MsApp/MsappArchiveTests.cs +++ b/src/Persistence.Tests/MsApp/MsappArchiveTests.cs @@ -64,7 +64,7 @@ public void GetDirectoryEntriesTests(string[] entries, string directoryName, str msappArchive.GetDirectoryEntries(directoryName, extension, true).Count().Should().Be(expectedRecursiveCount); } - [DataTestMethod] + [TestMethod] [DynamicData(nameof(AddEntryTestsData), DynamicDataSourceType.Method)] public void AddEntryTests(string[] entries, string[] expectedEntries) {