示例#1
0
        public void SetUp()
        {
            Assert.Null(_spells);
            string          path = TestContext.CurrentContext.TestDirectory + "/TestFiles/spells.json";
            ISpellsImporter sut  = new SpellsImporter();

            _spells = sut.Import(path).ToList();
            Assert.AreEqual(3, _spells.Count, "Spell count from spells.json should be 2");
        }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();
            ICharacterImporter    cimport = new CharacterImporter();
            ICharacterInformation ci      = cimport.Import("character.json");
            ISpellsImporter       simport = new SpellsImporter();
            IEnumerable <ISpell>  spells  = simport.Import("spells.json");
            var vm = new MainWindowViewModel(spells, ci, new SpellTemplate());

            DataContext = vm;
            //Preview.Render(vm.Renderable);
        }