From 3dccbbc6cddd4e383ca2a59ac93374105abaf353 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sun, 10 Mar 2024 11:05:20 +0100 Subject: [PATCH] Fix build error --- .../ObfuscationDictionaryTests.cs | 8 ++++---- .../DaxModelDeobfuscatorTests.cs | 2 +- .../Dax.Vpax.Obfuscator.Tests/DaxModelObfuscatorTests.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Dax.Vpax.Obfuscator.Common.Tests/ObfuscationDictionaryTests.cs b/tests/Dax.Vpax.Obfuscator.Common.Tests/ObfuscationDictionaryTests.cs index ff7e38f..48a0c52 100644 --- a/tests/Dax.Vpax.Obfuscator.Common.Tests/ObfuscationDictionaryTests.cs +++ b/tests/Dax.Vpax.Obfuscator.Common.Tests/ObfuscationDictionaryTests.cs @@ -7,14 +7,14 @@ public class ObfuscationDictionaryTests [Fact] public void ctor_EmptyTexts_ReturnsEmptyDictionary() { - var dictionary = new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), texts: []); + var dictionary = new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), "0.0.0-test", texts: []); Assert.Empty(dictionary.Texts); } [Fact] public void ctor_EmptyId_Throws() { - var exception = Assert.Throws(() => new ObfuscationDictionary(id: Guid.Empty.ToString("D"), texts: [])); + var exception = Assert.Throws(() => new ObfuscationDictionary(id: Guid.Empty.ToString("D"), "0.0.0-test", texts: [])); Assert.StartsWith("The dictionary identifier is not valid.", exception.Message); } @@ -27,7 +27,7 @@ public void ctor_DuplicateTexts_Throws() new ObfuscationText("VALUE", "XXXXXX"), }; - var exception = Assert.Throws(() => new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), texts)); + var exception = Assert.Throws(() => new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), "0.0.0-test", texts)); Assert.StartsWith("An item with the same key has already been added.", exception.Message); } @@ -128,6 +128,6 @@ private ObfuscationDictionary CreateTestDictionary() private ObfuscationDictionary CreateDictionary(ObfuscationText[] texts) { - return new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), texts); + return new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), "0.0.0-test", texts); } } diff --git a/tests/Dax.Vpax.Obfuscator.Tests/DaxModelDeobfuscatorTests.cs b/tests/Dax.Vpax.Obfuscator.Tests/DaxModelDeobfuscatorTests.cs index e3f6fdd..81c2d43 100644 --- a/tests/Dax.Vpax.Obfuscator.Tests/DaxModelDeobfuscatorTests.cs +++ b/tests/Dax.Vpax.Obfuscator.Tests/DaxModelDeobfuscatorTests.cs @@ -182,7 +182,7 @@ public void DeobfuscateExpression_StringLiteralWithEscapedQuotationMark_IsObfusc private (Model model, ObfuscationDictionary dictionary, DaxModelDeobfuscator deobfuscator) CreateTest(ObfuscationText[] texts) { - var dictionary = new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), texts); + var dictionary = new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), "0.0.0-test", texts); var model = new Model { ObfuscatorDictionaryId = dictionary.Id, diff --git a/tests/Dax.Vpax.Obfuscator.Tests/DaxModelObfuscatorTests.cs b/tests/Dax.Vpax.Obfuscator.Tests/DaxModelObfuscatorTests.cs index 4ea6f15..7d0ebe8 100644 --- a/tests/Dax.Vpax.Obfuscator.Tests/DaxModelObfuscatorTests.cs +++ b/tests/Dax.Vpax.Obfuscator.Tests/DaxModelObfuscatorTests.cs @@ -489,7 +489,7 @@ public void ObfuscateText_SingleChar_IsExtended() private static DaxModelDeobfuscator GetDeobfuscator(DaxModelObfuscator obfuscator) { var texts = obfuscator.Texts.Select((t) => t.ToObfuscationText()).ToArray(); - var dictionary = new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), texts); + var dictionary = new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), "0.0.0-test", texts); obfuscator.Model.ObfuscatorDictionaryId = dictionary.Id; return new DaxModelDeobfuscator(obfuscator.Model, dictionary); }