public void Test_Day6BlockDistributionStack_AreEqual() { var stack = new Day6BlockDistributionStack(); Assert.IsTrue(stack.AreEqual(new [] { 1, 4, 6, 2 }, new [] { 1, 4, 6, 2 })); Assert.IsFalse(stack.AreEqual(new [] { 1, 2, 3 }, new [] { 1, 2, 3, 4 })); Assert.IsFalse(stack.AreEqual(new [] { 1, 2, 3, 5 }, new [] { 1, 2, 3, 4 })); }
public void Test_Day6BlockDistributionStack_Push() { var stack = new Day6BlockDistributionStack(); Assert.IsTrue(stack.Push(new [] { 1, 4, 6, 2 }).Success); Assert.IsTrue(stack.Push(new [] { 1, 4, 3, 2 }).Success); Assert.IsTrue(stack.Push(new [] { 1, 2, 6, 2 }).Success); Assert.IsFalse(stack.Push(new [] { 1, 4, 3, 2 }).Success); }