diff --git a/src/Microsoft.PowerPlatform.PowerApps.Persistence.Tests/Yaml/YamlDeserializerTests.cs b/src/Microsoft.PowerPlatform.PowerApps.Persistence.Tests/Yaml/YamlDeserializerTests.cs index 940fa486..be86a515 100644 --- a/src/Microsoft.PowerPlatform.PowerApps.Persistence.Tests/Yaml/YamlDeserializerTests.cs +++ b/src/Microsoft.PowerPlatform.PowerApps.Persistence.Tests/Yaml/YamlDeserializerTests.cs @@ -10,15 +10,22 @@ namespace Microsoft.PowerPlatform.PowerApps.Persistence.Tests.Yaml; public class YamlDeserializerTests { [TestMethod] - public void Deserialize_ShouldParseSimpleStructure() + [DataRow("I am a screen with spaces", "42")] + [DataRow("NoSpaces", "-50")] + [DataRow("Yaml : | > ", "")] + [DataRow("Text`~!@#$%^&*()_-+=", ":")] + [DataRow("Text[]{};':\",.<>?/\\|", "@")] + [DataRow("こんにちは", "#")] + [DataRow("Cos'è questo?", "---")] + public void Deserialize_ShouldParseSimpleStructure(string textValue, string xValue) { var graph = new Screen() { Name = "Screen1", Properties = new Dictionary() { - { "Text", new() { Value = "I am a screen" } }, - { "X", new() { Value = "42" } }, + { "Text", new() { Value = textValue } }, + { "X", new() { Value = xValue } }, { "Y", new() { Value = "71" } }, }, }; @@ -36,8 +43,8 @@ public void Deserialize_ShouldParseSimpleStructure() sut.Properties.Should().NotBeNull() .And.HaveCount(3) .And.ContainKeys("Text", "X", "Y"); - sut.Properties["Text"].Value.Should().Be("I am a screen"); - sut.Properties["X"].Value.Should().Be("42"); + sut.Properties["Text"].Value.Should().Be(textValue); + sut.Properties["X"].Value.Should().Be(xValue); sut.Properties["Y"].Value.Should().Be("71"); } diff --git a/src/PAModel/Microsoft.PowerPlatform.Formulas.Tools.csproj b/src/PAModel/Microsoft.PowerPlatform.Formulas.Tools.csproj index 5371feef..a99e9f5a 100644 --- a/src/PAModel/Microsoft.PowerPlatform.Formulas.Tools.csproj +++ b/src/PAModel/Microsoft.PowerPlatform.Formulas.Tools.csproj @@ -68,4 +68,8 @@ runtime; build; native; contentfiles; analyzers + + + + diff --git a/src/PAModel/packages.lock.json b/src/PAModel/packages.lock.json index 8796d111..d650fb01 100644 --- a/src/PAModel/packages.lock.json +++ b/src/PAModel/packages.lock.json @@ -94,6 +94,12 @@ "type": "Transitive", "resolved": "6.0.0", "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" + }, + "microsoft.powerplatform.powerapps.persistence": { + "type": "Project", + "dependencies": { + "YamlDotNet": "[15.1.0, )" + } } } }