public void ReturnsForSingleValue()
        {
            var input = new int[][] { new[] { 1 } };
            var key = new VaultKey();

            var action = new Action<DayOfWeek>(day =>
                {
                    var result = key.GetCode(input, day);
                    AreEquivalent(result, input);
                });

            AssertFor(action, WeekDays);
            AssertFor(action, WeekendDays);
        }
        public void ReturnsForWeekendDays()
        {
            var input = new int[][] { new[] { 1, 2 }
                                    , new[] { 3, 4 } };
            var key = new VaultKey();

            var action = new Action<DayOfWeek>(day =>
            {
                var result = key.GetCode(input, day);
                Assert.IsTrue(AreEquivalent(result, new int[][]{ new[] { 2, 4 }
                                                               , new[] { 1, 3 }}));
            });

            AssertFor(action, WeekendDays);
        }
        public void DoesNotModifyInput()
        {
            var input = new int[][] { new[] { 1, 2 }
                                    , new[] { 3, 4 } };
            var key = new VaultKey();

            var action = new Action<DayOfWeek>(day =>
            {
                var result = key.GetCode(input, day);
                Assert.IsFalse(AreEquivalent(input, result));
            });

            AssertFor(action, WeekDays);
            AssertFor(action, WeekendDays);
        }
        public void ThrowsForEmptyInput()
        {
            var key = new VaultKey();

            var action = new Action<DayOfWeek>(day => key.GetCode(new int[0][], day));

            AssertFor(action, WeekDays);
            AssertFor(action, WeekendDays);
        }
        public void ThrowsForNullInput()
        {
            var key = new VaultKey();
            key.GetCode(null, DayOfWeek.Monday);

            var action = new Action<DayOfWeek>(day => key.GetCode(new int[][] { null }, day));

            AssertFor(action, WeekDays);
            AssertFor(action, WeekendDays);
        }
        public void ThrowsForInvalidInput()
        {
            var input = new int[][] { new[] { 1, 2 }, new[] { 2 } };
            var key = new VaultKey();

            var action = new Action<DayOfWeek>(day => key.GetCode(input, day));

            AssertFor(action, WeekDays);
            AssertFor(action, WeekendDays);
        }