Example #1
0
        public void Test3EatUpstreamers()
        {
            int         fishWeight  = 1;
            Stack <int> upstreamers = new Stack <int>(new List <int> {
                5, 2, 4
            });

            Assert.IsFalse(River.EatUpstreamers(fishWeight, ref upstreamers));
            Assert.AreEqual(3, upstreamers.Count);
        }
Example #2
0
        public void Test2EatUpstreamers()
        {
            int         fishWeight  = 6;
            Stack <int> upstreamers = new Stack <int>(new List <int> {
                5, 2, 1
            });

            Assert.IsTrue(River.EatUpstreamers(fishWeight, ref upstreamers));
            Assert.AreEqual(0, upstreamers.Count);
        }