public void SubscribeThrowsErrorForNullCompany() { var _subscriptionWs = new SubscriptionWS(); var user = new UserWS() { id = "1" }; _subscriptionWs.paymentPlanId = "0"; _subscriptionWs.user = user; Assert.Throws<ArgumentNullException>(() => _appDirectApi.SubscribeUser(_subscriptionWs)); }
public void Init() { _xmlSerializer = new XmlSerializer(typeof(SubscriptionWS)); _subscriptionWs = new SubscriptionWS(); var user = new UserWS() { id = "1" }; var company = new CompanyWS() { id = "2" }; _subscriptionWs.paymentPlanId = "0"; _subscriptionWs.user = user; _subscriptionWs.company = company; _serializedXml = SerializeToString(_subscriptionWs); }
public void SubscribeUserNullWhenNotAuthenticated() { var _subscriptionWs = new SubscriptionWS(); var user = new UserWS() { id = "1" }; var company = new CompanyWS() { id = "2" }; _subscriptionWs.paymentPlanId = "0"; _subscriptionWs.user = user; _subscriptionWs.company = company; Assert.IsNull(_appDirectApi.SubscribeUser(_subscriptionWs)); }