예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }