public void SubscriptionsService_GetSubscription_result_not_null() { int id = 85; var mock = new Mock <IUnitOfWork>(); mock.Setup(a => a.Subscriptions.Get(id)).Returns(new Subscription()); service = new SubscriptionsService(mock.Object); var result = service.GetSubscription(id); Assert.IsNotNull(result); }
private int CreateLineItemFromSubscription(int customerId, int itemId) { var subscriptionsService = new SubscriptionsService(Config); var subscriptionId = subscriptionsService.CreateSubscription(new Subscription { CustomerId = customerId, HoldUntilDatetime = DateTime.Parse("2013-10-01"), LineItems = new SubscriptionLineItem[] { new SubscriptionLineItem { Description = "desc", ItemId = itemId } } }).Id; return(subscriptionsService.GetSubscription(subscriptionId).Response.LineItems[0].LineItemId); }