public void GetFreeSubscriptionPlanIdReturnsNullForNoFreeProduct()
        {
            string _applicationId = "test352";
            var    testProduct    = _serializer.Deserialize <Product>(_testProductXml);

            foreach (var edition in testProduct.Pricing.Editions)
            {
                foreach (var plan in edition.Plans)
                {
                    foreach (var cost in plan.Costs)
                    {
                        foreach (var amount in cost.Amounts)
                        {
                            amount.Value = 5m;
                        }
                    }
                }
            }

            _appDirectApiMock.GetExtendedAppInfo(_applicationId).Returns(testProduct);

            Assert.IsNull(_cachedAppDirectApi.GetFreeSubscriptionPlanId(_applicationId));
        }
예제 #2
0
        public void FreeAppHasFreePlan()
        {
            var planId = _cachedAppDirectApi.GetFreeSubscriptionPlanId(TestData.TestFreeAppId);

            Assert.IsNotNullOrEmpty(planId);
        }