public void TestCandidateNull() { SetUp1(); candidates = Apriori.GenerateCandidate(input.ElementAt(0), input.ElementAt(1)); Assert.IsTrue(candidates == null); candidates = Apriori.GenerateCandidate(input.ElementAt(0), input.ElementAt(2)); Assert.IsTrue(candidates == null); candidates = Apriori.GenerateCandidate(input.ElementAt(0), input.ElementAt(3)); Assert.IsTrue(candidates == null); }
public void TestCandidate3x3() { SetUp3(); candidates = Apriori.GenerateCandidate(input.ElementAt(0), input.ElementAt(4)); Assert.IsTrue(candidates == null); candidates = Apriori.GenerateCandidate(input.ElementAt(2), input.ElementAt(3)); Assert.IsTrue(candidates != null); Assert.IsTrue(candidates[2] == "Diapers"); Assert.IsTrue(candidates[3] == "Eggs"); candidates = Apriori.GenerateCandidate(input.ElementAt(4), input.ElementAt(5)); Assert.IsTrue(candidates != null); Assert.IsTrue(candidates[2] == "Eggs"); Assert.IsTrue(candidates[3] == "Milk"); }
public void TestCandidate2x2() { SetUp2(); candidates = Apriori.GenerateCandidate(input.ElementAt(0), input.ElementAt(1)); Assert.IsTrue(candidates != null); Assert.IsTrue(candidates.Length == 3); Assert.IsTrue(candidates[2] == "Milk"); candidates = Apriori.GenerateCandidate(input.ElementAt(2), input.ElementAt(3)); Assert.IsTrue(candidates != null); Assert.IsTrue(candidates[1] == "Cola"); candidates = Apriori.GenerateCandidate(input.ElementAt(0), input.ElementAt(4)); Assert.IsTrue(candidates != null); Assert.IsTrue(candidates[2] == "Eggs"); }