mirror of
https://github.com/abdelkader/vCardEditor
synced 2025-12-12 08:27:19 +07:00
fixed test
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using NSubstitute;
|
||||
using System;
|
||||
using vCardEditor.Libs.TinyJson;
|
||||
using vCardEditor.Repository;
|
||||
|
||||
@@ -22,5 +21,18 @@ namespace vCardEditor_Test
|
||||
Assert.IsTrue(embeddedlang.languages.Count == 2, "Number of json entries invalid");
|
||||
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void IncorrectJsonLoaded_Test()
|
||||
{
|
||||
var fileHandler = Substitute.For<IFileHandler>();
|
||||
fileHandler.LoadJsonFromAssembly(Arg.Any<string>()).Returns(JsonEntries.InvalidJsonValid);
|
||||
var JsonParser = new TinyJsonParser();
|
||||
|
||||
var embeddedlang = new LocalizationLoader(JsonParser, fileHandler).LoadEmbedded();
|
||||
|
||||
|
||||
Assert.IsTrue(embeddedlang.version == "1.0", "Json version incorrect");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user