示例#1
0
        public void CompareToNullPlan()
        {
            Plan plan1 = new Plan(null, null, null, null, null);
            Plan plan2 = null;

            Assert.AreEqual(1, plan1.CompareTo(plan2));
        }
示例#2
0
        public void CompareToSamePlans()
        {
            Plan plan1 = new Plan(null, null, null, null, null);
            Plan plan2 = plan1;

            Assert.AreEqual(0, plan1.CompareTo(plan2));
        }
示例#3
0
        public void CompareToVersion(int expected, string version1, string version2)
        {
            Plan plan1 = new Plan(null, null, null, null, version1);
            Plan plan2 = new Plan(null, null, null, null, version2);

            Assert.AreEqual(expected, plan1.CompareTo(plan2));
        }
示例#4
0
        public void CompareToPublisher(int expected, string publisher1, string publisher2)
        {
            Plan plan1 = new Plan(null, publisher1, null, null, null);
            Plan plan2 = new Plan(null, publisher2, null, null, null);

            Assert.AreEqual(expected, plan1.CompareTo(plan2));
        }
示例#5
0
        public void CompareToPromotionCode(int expected, string promotionCode1, string promotionCode2)
        {
            Plan plan1 = new Plan(null, null, null, promotionCode1, null);
            Plan plan2 = new Plan(null, null, null, promotionCode2, null);

            Assert.AreEqual(expected, plan1.CompareTo(plan2));
        }
示例#6
0
        public void CompareToProduct(int expected, string product1, string product2)
        {
            Plan plan1 = new Plan(null, null, product1, null, null);
            Plan plan2 = new Plan(null, null, product2, null, null);

            Assert.AreEqual(expected, plan1.CompareTo(plan2));
        }
示例#7
0
        public void CompareToName(int expected, string name1, string name2)
        {
            Plan plan1 = new Plan(name1, null, null, null, null);
            Plan plan2 = new Plan(name2, null, null, null, null);

            Assert.AreEqual(expected, plan1.CompareTo(plan2));
        }