public void TestSatisfiabilityCombination()
        {
            var tally = new GridTally(1);

            tally[0] = 3;

            Assert.AreEqual(Satisfiability.VIOLATED, tally.GetSatisfiability(new int[1] {
                1
            }, new int[1] {
                1
            }));
            Assert.AreEqual(Satisfiability.SATISFIABLE, tally.GetSatisfiability(new int[1] {
                1
            }, new int[1] {
                2
            }));
            Assert.AreEqual(Satisfiability.SATISFIED, tally.GetSatisfiability(new int[1] {
                3
            }, new int[1] {
                0
            }));
            Assert.AreEqual(Satisfiability.SATISFIED, tally.GetSatisfiability(new int[1] {
                3
            }, new int[1] {
                1
            }));
            Assert.AreEqual(Satisfiability.VIOLATED, tally.GetSatisfiability(new int[1] {
                4
            }, new int[1] {
                0
            }));
        }
        public void TestSatisfiabilityMoreThanOne()
        {
            var tally = new GridTally(2);

            tally[0] = 1;
            tally[1] = 2;

            Assert.AreEqual(Satisfiability.SATISFIABLE, tally.GetSatisfiability(new int[2] {
                0, 0
            }, new int[2] {
                1, 2
            }));
            Assert.AreEqual(Satisfiability.SATISFIABLE, tally.GetSatisfiability(new int[2] {
                1, 0
            }, new int[2] {
                0, 2
            }));
            Assert.AreEqual(Satisfiability.SATISFIABLE, tally.GetSatisfiability(new int[2] {
                0, 2
            }, new int[2] {
                1, 0
            }));

            Assert.AreEqual(Satisfiability.SATISFIED, tally.GetSatisfiability(new int[2] {
                1, 2
            }, new int[2] {
                0, 0
            }));

            Assert.AreEqual(Satisfiability.VIOLATED, tally.GetSatisfiability(new int[2] {
                2, 1
            }, new int[2] {
                0, 1
            }));
            Assert.AreEqual(Satisfiability.VIOLATED, tally.GetSatisfiability(new int[2] {
                0, 3
            }, new int[2] {
                1, 0
            }));
            Assert.AreEqual(Satisfiability.VIOLATED, tally.GetSatisfiability(new int[2] {
                2, 2
            }, new int[2] {
                0, 0
            }));
            Assert.AreEqual(Satisfiability.VIOLATED, tally.GetSatisfiability(new int[2] {
                1, 3
            }, new int[2] {
                0, 0
            }));
            Assert.AreEqual(Satisfiability.VIOLATED, tally.GetSatisfiability(new int[2] {
                2, 3
            }, new int[2] {
                0, 0
            }));
        }
        public void TestSatisfiabilityLengthRange()
        {
            var tally = new GridTally(3);

            Assert.ThrowsException <ArgumentOutOfRangeException>(() => tally.GetSatisfiability(new int[2], new int[2]));
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => tally.GetSatisfiability(new int[2], new int[3]));
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => tally.GetSatisfiability(new int[3], new int[2]));
            tally.GetSatisfiability(new int[3], new int[3]);
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => tally.GetSatisfiability(new int[3], new int[4]));
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => tally.GetSatisfiability(new int[4], new int[3]));
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => tally.GetSatisfiability(new int[4], new int[4]));
        }