コード例 #1
0
        public void FindConstraintTest2()
        {
            var data       = new KnapsackProblemDataParser();
            var constraint = KnapsackProblemDataParser.FindConstraint("Something else", data);

            Assert.AreEqual(KnapsackProblemDataParser.FindConstraint, constraint);
        }
コード例 #2
0
        public void FindConstraintTest1()
        {
            var data       = new KnapsackProblemDataParser();
            var constraint = KnapsackProblemDataParser.FindConstraint("c: 123", data);

            Assert.AreEqual(KnapsackProblemDataParser.FindDataStart, constraint);
            Assert.AreEqual(123, data.MaxWeight);
        }