【问题标题】:Unable to use shims in MStest to fake a SharePoint in .net无法在 MStest 中使用垫片来伪造 .net 中的 SharePoint
【发布时间】:2021-08-20 11:55:39
【问题描述】:
public static SPListItemCollection GetItemsReadyForPublish(SPWeb tempWeb)
{
    SPList stagingLibrary = tempWeb.Lists["examplelibrary"];
    SPQuery CamlQuery = new SPQuery();
    CamlQuery.Query = $"<Where><Eq><FieldRef Name='{"DocumentStatus"}'/><Value Type='Text'>{"Ready For Publish""}</Value></Eq></Where>";
    CamlQuery.ViewAttributes = "Scope=\"Recursive\"";
    SPListItemCollection itemCollection = stagingLibrary.GetItems(CamlQuery);
    return itemCollection;
}

在这个 SharePoint 中,有很多库,我想抓取“示例库”。

能否请一些人帮助我使用 shims 编写此功能的测试用例。我很难伪造 SharePoint 列表,因为没有可参考的文档,这是我第一次为 SharePoint 这样做。

【问题讨论】:

    标签: c# .net sharepoint microsoft-fakes shim


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2015-07-13
      • 2022-12-29
      • 1970-01-01
      • 2022-07-21
      • 2013-04-15
      • 1970-01-01
      • 1970-01-01
      • 2021-10-08
      • 2019-09-27
      相关资源
      最近更新 更多