public BattlesStats Collect() { var unassignedCount = bugTrackerClient.GetFilteredCount("#Billy #Battle State: -Resolved Assignee: Unassigned"); var subProductIds = subProductsRef.GetSubproductIds(); var subProductsStatsList = new List <SubProductBattleStats>(); foreach (var subProductId in subProductIds) { var productName = subProductsRef.GetSubProductName(subProductId); var subProductUnassignedCount = bugTrackerClient.GetFilteredCount($"project: Billing Type: Battle State: Open, Reopened Подпродукт: {{{productName}}} Assignee: Unassigned"); var subProductTotalCount = bugTrackerClient.GetFilteredCount($"project: Billing Type: Battle State: Open, Reopened Подпродукт: {{{productName}}}"); subProductsStatsList.Add(new SubProductBattleStats { UnassignedCount = subProductUnassignedCount, TotalCount = subProductTotalCount, SubProductId = subProductId }); } var fuckupsOrdersTotalCount = bugTrackerClient.GetFilteredCount("project: fuckups Teams: Billing.Orders"); return(new BattlesStats { UnassignedCount = unassignedCount, SubProducStats = subProductsStatsList.ToArray(), SubProductFuckups = new [] { new SubProductFuckupStats { SubProductId = "Orders", TotalCount = fuckupsOrdersTotalCount } } }); }
public void AbleToFilterBattles() { const string filter = "project: Billy Type: Battle created: 2017-07-22 ..2017-07-24"; var actualIssues = bugTrackerClient.GetFiltered(filter); var actualIssuesCount = bugTrackerClient.GetFilteredCount(filter); Assert.NotEmpty(actualIssues); Assert.Equal(actualIssues.Length, actualIssuesCount); }