コード例 #1
0
        public void PickNPicksExactlyNPairs()
        {
            List <Tuple <IPartition, IPartition> > list = new List <Tuple <IPartition, IPartition> >();

            for (int i = 0; i < 10; i++)
            {
                list.Add(Tuple.Create((IPartition)PartitionTest.P(), (IPartition)PartitionTest.P()));
            }

            Assert.Equal(5, refiner.PickN(5, list).Count());
        }
コード例 #2
0
 public void RefineCalledWithNullThrows()
 {
     Assert.Throws(typeof(ArgumentNullException), () => refiner.Refine(null, null));
     Assert.Throws(typeof(ArgumentNullException), () => refiner.Refine(PartitionTest.P(), null));
     Assert.Throws(typeof(ArgumentNullException), () => refiner.Refine(null, PartitionTest.P()));
 }
コード例 #3
0
 public KLPartitionRefinerTest()
 {
     this.refiner = new KLPartitionRefiner();
     this.p1      = PartitionTest.P();
     this.p2      = PartitionTest.P();
 }