示例#1
0
        public void ConvertSDKToSDK()
        {
            sdkPlan   = CreateTypicalSDKPlan();
            converter = new PlanConverter(sdkPlan);
            Plan plan = converter.ToSDKPlan();

            Assert.IsNotNull(plan);
            Assert.AreEqual(sdkPlan, plan);
        }
示例#2
0
        public void ConvertAPIToSDK()
        {
            apiPlan   = CreateTypicalAPIPlan();
            converter = new PlanConverter(apiPlan);
            Plan plan = converter.ToSDKPlan();

            Assert.IsNotNull(plan);
            Assert.AreEqual(PLAN_CONTRACT, plan.Contract);
            Assert.AreEqual(PLAN_PRICE_AMOUNT, plan.Price.Amount);
            Assert.AreEqual(PLAN_CYC_COUNT, plan.FreeCycles.Count);
            Assert.AreEqual(1, plan.Quotas.Count);
            Assert.AreEqual(PLAN_QUOTA_SCOPE, plan.Quotas[0].Scope);
        }
示例#3
0
 public void ConvertNullSDKToSDK()
 {
     sdkPlan   = null;
     converter = new PlanConverter(sdkPlan);
     Assert.IsNull(converter.ToSDKPlan());
 }
示例#4
0
 public void ConvertNullAPIToSDK()
 {
     apiPlan   = null;
     converter = new PlanConverter(apiPlan);
     Assert.IsNull(converter.ToSDKPlan());
 }