Ejemplo n.º 1
0
        public void ShouldComputeMinimumBribes(params int[] queue)
        {
            // hack: first value is the expected result
            var expected = queue[0];
            var sut      = new MinimumBribes();

            Assert.Equal(expected, sut.GetBribesCount(queue.Skip(1).ToArray()));
        }
Ejemplo n.º 2
0
        public void ShouldDetectChaos(params int[] queue)
        {
            var sut = new MinimumBribes();

            Assert.Throws <TooChaoticException>(() => sut.GetBribesCount(queue));
        }