public void AzGetPRsDAIntegrationTest() { //Arrange TableStorageAuth tableStorageAuth = Common.GenerateTableAuthorization(Configuration); string organization = "samsmithnz"; string project = "SamLearnsAzure"; //Act AzureTableStorageDA da = new AzureTableStorageDA(); JArray list = da.GetTableStorageItems(tableStorageAuth, tableStorageAuth.TableAzureDevOpsBuilds, da.CreateAzureDevOpsPRPartitionKey(organization, project)); //Assert Assert.IsTrue(list.Count >= 0); }
public void AzGetPRCommitsDAIntegrationTest() { //Arrange TableStorageAuth tableStorageAuth = Common.GenerateTableAuthorization(Configuration); string organization = "samsmithnz"; string project = "SamLearnsAzure"; //Act AzureTableStorageDA da = new AzureTableStorageDA(); JArray prList = da.GetTableStorageItems(tableStorageAuth, tableStorageAuth.TableAzureDevOpsPRs, da.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.GetTableStorageItems(tableStorageAuth, tableStorageAuth.TableAzureDevOpsPRCommits, da.CreateAzureDevOpsPRCommitPartitionKey(organization, project, pullRequestId)); if (list.Count > 0) { itemsAdded = list.Count; break; } } //Assert Assert.IsTrue(itemsAdded >= 0); }