Sorts by level now.

Signed-off-by: Melissa Avery-Weir <melissa.avery@wellsfargo.com>
This commit is contained in:
Melissa Avery-Weir
2011-09-16 13:32:39 -04:00
parent 4b31f5a561
commit c330e590b0
32 changed files with 918 additions and 58 deletions

View File

@@ -6,6 +6,7 @@ using Xunit;
using d20_SRD_Spell_Lists.Models;
using System.Xml.Linq;
using System.IO;
using d20_SRD_Spell_Lists.Properties;
namespace d20_SRD_Spell_Lists_Tests
{
@@ -49,6 +50,23 @@ namespace d20_SRD_Spell_Lists_Tests
});
}
//[Fact]
//public void savingWithoutPreexistingUserFileCreatesOne() {
// if (System.IO.File.Exists(Settings.Default.UserSpells)) {
// System.IO.File.Delete(Settings.Default.UserSpells);
// }
// SpellSet spells = new SpellSet(masterSpellList);
// spells.addUserSpell(new XElement("spell",
// new XElement("name", "custom test spell")
// ));
// Assert.DoesNotThrow(delegate {
// spells.save();
// });
// Assert.True(System.IO.File.Exists(Settings.Default.UserSpells));
//}
[Fact]
public void loadingValidMasterXMLShouldResultIn699MasterSpells() {
SpellSet spells = new SpellSet(masterSpellList, userSpellList);

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8" ?><character><name>Thomasina</name><class>Cleric</class><spells><spell><name>Dummy Character Spell</name><short_description>A short description.</short_description></spell></spells></character>
<?xml version="1.0" encoding="utf-8" ?><character><spells><spell><name>Dummy Character Spell</name><short_description>A short description.</short_description></spell></spells></character>