public void CardsTest() { var w = new Weapon("weapon"); var s = new Suspect("suspect"); var l = new Place("location"); Suspicion target = new Suspicion(s, w, l); List<Card> cards = target.Cards.ToList(); CollectionAssert.Contains(cards, w); CollectionAssert.Contains(cards, s); CollectionAssert.Contains(cards, l); Assert.AreEqual(3, cards.Count); }
/// <summary> /// Initializes a new instance of the <see cref="Suspicion"/> class. /// </summary> /// <param name="suspect">The suspect.</param> /// <param name="weapon">The weapon.</param> /// <param name="place">The place.</param> public Suspicion(Suspect suspect, Weapon weapon, Place place) { Contract.Requires<ArgumentNullException>(suspect != null, "suspect"); Contract.Requires<ArgumentNullException>(weapon != null, "weapon"); Contract.Requires<ArgumentNullException>(place != null, "place"); this.suspect = suspect; this.weapon = weapon; this.place = place; Contract.Assume(this.Cards.Count() == 3); }
public void LocationConstructorTest() { const string name = "Test"; Card c = new Place(name); Assert.AreEqual(name, c.Name); }