Beispiel #1
0
 public void GetConstraintsWithoutCardTest()
 {
     Disproved target = new Disproved(disprovingPlayer, suggestion);
     var constraints = target.GetConstraints(nodes);
     Assert.AreEqual(1, constraints.Count());
     var c = constraints.First() as SelectionCountConstraint;
     Assert.IsNotNull(c);
     CollectionAssert.AllItemsAreUnique(c.Nodes.ToList());
     Assert.AreEqual(3, c.Nodes.Count());
     Assert.AreEqual(1, c.Min);
     Assert.AreEqual(3, c.Max);
     Assert.IsTrue(c.SelectionState);
 }
Beispiel #2
0
 public void GetConstraintsWithCardTest()
 {
     Disproved target = new Disproved(disprovingPlayer, suggestion, cardShown);
     var constraints = target.GetConstraints(nodes);
     Assert.AreEqual(1, constraints.Count());
     var c = constraints.First() as SelectionCountConstraint;
     Assert.IsNotNull(c);
     Assert.AreEqual(1, c.Nodes.Count());
     Assert.AreSame((from n in nodes where n.Card == cardShown select n).First(), c.Nodes.First());
     Assert.AreEqual(1, c.Min);
     Assert.AreEqual(1, c.Max);
     Assert.IsTrue(c.SelectionState);
 }