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)); }
public void ShouldCreateWAPackIaaSClient() { var factory = new WebClientFactory(new Subscription(), null); Assert.IsInstanceOfType(factory.CreateClient("a"), typeof(WAPackIaaSClient)); }
public void ShouldThrowWithNullSubscription() { var factory = new WebClientFactory(null, null); factory.CreateClient(string.Empty); }