public void AzGetPRCommitsDAIntegrationTest() { //Arrange TableStorageConfiguration tableStorageConfig = Common.GenerateTableAuthorization(base.Configuration); string organization = "samsmithnz"; string project = "SamLearnsAzure"; //Act AzureTableStorageDA da = new(); JArray prList = da.GetTableStorageItemsFromStorage(tableStorageConfig, tableStorageConfig.TableAzureDevOpsPRs, PartitionKeys.CreateAzureDevOpsPRPartitionKey(organization, project)); int itemsAdded = 0; foreach (JToken item in prList) { AzureDevOpsPR pullRequest = JsonConvert.DeserializeObject <AzureDevOpsPR>(item.ToString()); string pullRequestId = pullRequest.PullRequestId; JArray list = da.GetTableStorageItemsFromStorage(tableStorageConfig, tableStorageConfig.TableAzureDevOpsPRCommits, PartitionKeys.CreateAzureDevOpsPRCommitPartitionKey(organization, project, pullRequestId)); if (list.Count > 0) { itemsAdded = list.Count; break; } } //Assert Assert.IsTrue(itemsAdded >= 0); }
public void AzGetPRsDAIntegrationTest() { //Arrange TableStorageConfiguration tableStorageConfig = Common.GenerateTableAuthorization(base.Configuration); string organization = "samsmithnz"; string project = "SamLearnsAzure"; //Act AzureTableStorageDA da = new(); JArray list = da.GetTableStorageItemsFromStorage(tableStorageConfig, tableStorageConfig.TableAzureDevOpsBuilds, PartitionKeys.CreateAzureDevOpsPRPartitionKey(organization, project)); //Assert Assert.IsTrue(list.Count >= 0); }