Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
albertospelta committed Mar 10, 2024
1 parent 10e871e commit 3dccbbc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ArgumentException>(() => new ObfuscationDictionary(id: Guid.Empty.ToString("D"), texts: []));
var exception = Assert.Throws<ArgumentException>(() => new ObfuscationDictionary(id: Guid.Empty.ToString("D"), "0.0.0-test", texts: []));
Assert.StartsWith("The dictionary identifier is not valid.", exception.Message);
}

Expand All @@ -27,7 +27,7 @@ public void ctor_DuplicateTexts_Throws()
new ObfuscationText("VALUE", "XXXXXX"),
};

var exception = Assert.Throws<ArgumentException>(() => new ObfuscationDictionary(id: Guid.NewGuid().ToString("D"), texts));
var exception = Assert.Throws<ArgumentException>(() => 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);
}

Expand Down Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/Dax.Vpax.Obfuscator.Tests/DaxModelObfuscatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3dccbbc

Please sign in to comment.