Fixing tests to accomodate for interesting XML behavior.
This commit is contained in:
parent
72d080c04c
commit
ec03e0d647
@ -64,7 +64,23 @@ namespace RecrownedGTK.Test.Persistence {
|
||||
public void SaveTestContent() {
|
||||
preferences.SetPreference("val", 1);
|
||||
preferences.Save();
|
||||
FileAssert.AreEqual("assets/preferences.xml", string.Format("{0}/{1}.xml", PATH, FILENAME));
|
||||
string[] expectedLines = File.ReadAllLines("assets/preferences.xml");
|
||||
string expected = null;
|
||||
|
||||
for (int i = 0; i < expectedLines.Length; i++) {
|
||||
if (i != 1) {
|
||||
expected += expectedLines[i];
|
||||
}
|
||||
}
|
||||
|
||||
string[] actualLines = File.ReadAllLines(string.Format("{0}/{1}.xml", PATH, FILENAME));
|
||||
string actual = null;
|
||||
for (int i = 0; i < expectedLines.Length; i++) {
|
||||
if (i != 1) {
|
||||
actual += actualLines[i];
|
||||
}
|
||||
}
|
||||
Assert.AreEqual(expected, actual);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user