public static void ClassCleanup() { //Delete ALL Images //Delete Image List //Call get all lists to verify deletion var imageListclient = new ListManagementClient(ConfigurationManager.AppSettings["subscriptionkey"]); var updateImageList = imageListclient.ImageListUpdateAsync(listId, "Updated Name", "Updated", null).Result; Assert.IsNotNull(updateImageList); var deleteAllRes = imageListclient.ImageDeleteAllAsync(listId).Result; Assert.IsNotNull(deleteAllRes); var deleteImageList = imageListclient.ImageListDeleteAsync(listId).Result; Assert.IsNotNull(deleteImageList); var getAllRes = imageListclient.ImageListGetAllAsync().Result; Assert.IsNotNull(getAllRes); Assert.IsTrue(!getAllRes.Exists(e => e.Id == listId)); }
public static void ClassInitialize(TestContext testContext) { //Create a new list //Get all Lists to verify creation var imageListclient = new ListManagementClient(ConfigurationManager.AppSettings["subscriptionkey"]); var listName = Guid.NewGuid().ToString("n"); Dictionary <string, string> listMetaData = new Dictionary <string, string>(); listMetaData.Add("MyListMData1", "MyListMData1"); listMetaData.Add("MyListMData2", "MyListMData2"); var createRes = imageListclient.ImageListCreateAsync(listName, "This is Unit Test", listMetaData).Result; Assert.IsNotNull(createRes); Assert.IsTrue(!string.IsNullOrWhiteSpace(createRes.Id)); listId = createRes.Id; var getAllRes = imageListclient.ImageListGetAllAsync().Result; Assert.IsNotNull(getAllRes); Assert.IsTrue(getAllRes.Count > 0); Assert.IsTrue(getAllRes.Exists(e => e.Id == createRes.Id)); Dictionary <string, string[]> x = new Dictionary <string, string[]>(); }
public void ListManagementDomainSetByDefault() { var lists = new ListManagementClient(string.Empty); var managementDomain = new Uri(ListManagementClient.ListManagementDomain, UriKind.Absolute); Assert.Equal(managementDomain.Host, lists.Client.BaseAddress.Host); }
public ListManagementTests() { this.client = new ListManagementClient(ConfigurationManager.AppSettings["subscriptionkey"], ConfigurationManager.AppSettings["listmanagmentrooturl"]); }
public ImageListAndMatchScenarios() { this.imageListclient = new ListManagementClient(ConfigurationManager.AppSettings["subscriptionkey"]); this.moderatorClient = new ModeratorClient(ConfigurationManager.AppSettings["subscriptionkey"]); }
public TextListScreenScenarios() { this.textListclient = new ListManagementClient(ConfigurationManager.AppSettings["subscriptionkey"]); this.moderatorClient = new ModeratorClient(ConfigurationManager.AppSettings["subscriptionkey"]); }