public void ShouldInitializeOwlsAtStartingPositions() { var owls = new Parliament(2); owls.AssertPositionsMatch(0, 1); Assert.AreEqual(0, owls.InTheNest); }
public void ShouldPerformMoveAction() { var owls = new Parliament(2); owls.Move(0, 2); owls.AssertPositionsMatch(1, 2); Assert.AreEqual(0, owls.InTheNest); }
public void ShouldPerformNestAction() { var owls = new Parliament(2); owls.Nest(0); owls.AssertPositionsMatch(1); Assert.AreEqual(1, owls.InTheNest); }
public void ShouldNotBeEqualIfTheyHaveDifferentOwlCounts() { var twoOwls = new Parliament(2); var threeOwls = new Parliament(3); threeOwls.Nest(threeOwls.LeadOwl); twoOwls.AssertPositionsMatch(threeOwls); Assert.AreEqual(0, twoOwls.InTheNest); Assert.AreEqual(1, threeOwls.InTheNest); Assert.AreNotEqual(twoOwls, threeOwls); }
public static void AssertPositionsMatch(this Parliament owls, Parliament otherOwls) { owls.AssertPositionsMatch(otherOwls.ListOfPositions.ToArray()); }