我收到以下错误消息:
Assert.AreEqual失败。预期:<1>。实际:<0>
和相关代码在下面; 谁能告诉我问题出在哪里,我该如何解决?
[TestMethod]
[TestProperty("TestCaseId", "637683")]
public void DiscoveryFunctionalTests_BucketedPivotTests_TVShowOnly_ItemsPerRowBasicScenario_NoError()
{
var pivotConstraints = new List<string> { "ShowType|TVShow" };
var items = this.clientContext.DiscoveryClient.GetBucketedPivotItems(pivotConstraints, groups: discoveryGroups, itemsPerRow: 1).ToList();
Assert.IsNotNull(items.FirstOrDefault(), "No pivot items were returned");
foreach (var item in items)
{
//error is here Assert.AreEqual(1, item.Items.Count());
Assert.IsTrue(
item.Items.All(
queryItem =>
((queryItem.ItemType == QueryItemType.Series) ||
((queryItem.ItemType == QueryItemType.Program) && (this.clientContext.DiscoveryClient.GetProgramById(queryItem.Id).ShowType == ShowType.TVShow)))));
}
}