Ejemplo n.º 1
0
 public void GetContraintsMissingNodesTest()
 {
     Player playerShowingCard = new Player("test");
     Card cardSeen = new Weapon("test");
     Card anotherCard = new Suspect("test");
     Node[] nodes = new Node[] {
                        new Node(playerShowingCard, cardSeen),
                        new Node(playerShowingCard, anotherCard),
                    };
     new SpyCard(playerShowingCard, cardSeen).GetConstraints(nodes.Where((n, i) => i == 1)).Count();
 }
Ejemplo n.º 2
0
 public void GetConstraintsTest()
 {
     Player playerShowingCard = new Player("test");
     Card cardSeen = new Weapon("test");
     Card anotherCard = new Suspect("test");
     Node[] nodes = new Node[] {
                        new Node(playerShowingCard, cardSeen),
                        new Node(playerShowingCard, anotherCard),
                    };
     SpyCard target = new SpyCard(playerShowingCard, cardSeen);
     var actual = target.GetConstraints(nodes);
     Assert.AreEqual(1, actual.Count());
     SelectionCountConstraint c = actual.First() as SelectionCountConstraint;
     Assert.IsNotNull(c);
     Assert.AreEqual(1, c.Min);
     Assert.AreEqual(1, c.Max);
     Assert.AreEqual(1, c.Nodes.Count());
     Assert.AreSame(nodes[0], c.Nodes.First());
 }