消息:Assert.AreEqual失败。预期:<1>。实际:<0>

时间:2019-10-07 05:38:04

标签: c#

消息:Assert.AreEqual失败。预期:<1>。实际值:<0>。

    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)
        {
          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)))));
        }
    }

任何伙伴都可以告诉我错误是什么以及我该如何解决 或在哪里可以准确更改代码

0 个答案:

没有答案