public void TestMethod1() { var test = new TestCardViewModel("Suntail Hawk", "W"); Assert.AreEqual("Suntail Hawk", test.Name); Assert.IsNotNull(test.ManaCost); Assert.IsNotNull(test.ManaCost.ManaCost); Assert.AreEqual(1, test.ManaCost.ManaCost.Count); Assert.AreEqual("White", test.ManaCost.ManaCost[0].ManaColor); Assert.AreEqual(1, test.ManaCost.ManaCost[0].Count); }
protected override void SetDataContextIfInDesignMode() { try { this.TestViewModel = new TestCardViewModel("Suntail Hawk", "W"); } catch (Exception e) { Debug.WriteLine(e.Message); Debug.Write(e.StackTrace); Debug.WriteLine(e.Source); } finally { if(this.InDesignMode) this.DataContext = this.TestViewModel; } }