Add extra legacy skin parsing tests

This commit is contained in:
Dean Herbert 2019-09-03 18:59:11 +09:00
parent f58ca82398
commit 343af28ed5
2 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,6 @@
[General]
Name: test skin
TestLookup: TestValue
[Colours]
Combo1 : 142,199,255

View File

@ -41,5 +41,20 @@ public void TestDecodeSkinColours(bool hasColours)
Assert.AreEqual(expectedColors[i], comboColors[i]);
}
}
[Test]
public void TestDecodeGeneral()
{
var decoder = new LegacySkinDecoder();
using (var resStream = TestResources.OpenResource("skin.ini"))
using (var stream = new StreamReader(resStream))
{
var config = decoder.Decode(stream);
Assert.AreEqual("test skin", config.SkinInfo.Name);
Assert.AreEqual("TestValue", config.ConfigDictionary["TestLookup"]);
}
}
}
}