예제 #1
0
        internal void SaveTrainerDocuments(List<TrainerDocument> trainerDocuments)
        {
            try
            {
                using (var usersFactory = new WebClientFactory<ITrainerDocument>())
                {
                    var client = usersFactory.CreateClient();

                    client.SaveTrainerDocuments(trainerDocuments);
                }
            }
            catch (Exception ex)
            {
                ErrorMessage = ex.Message;
            }
        }
        public void ShouldCreateWAPackIaaSClient()
        {
            var factory = new WebClientFactory(new Subscription(), null);

            Assert.NotNull(factory.CreateClient("a"));
        }
        public void ShouldThrowWithNullSubscription()
        {
            var factory = new WebClientFactory(null, null);

            Assert.Throws <ArgumentNullException>(() => factory.CreateClient(string.Empty));
        }
예제 #4
0
        public void ShouldCreateWAPackIaaSClient()
        {
            var factory = new WebClientFactory(new Subscription(), null);

            Assert.IsInstanceOfType(factory.CreateClient("a"), typeof(WAPackIaaSClient));
        }
예제 #5
0
        public void ShouldThrowWithNullSubscription()
        {
            var factory = new WebClientFactory(null, null);

            factory.CreateClient(string.Empty);
        }