feat(05-01): make helper methods internal and add unit tests
- Changed IsThrottleException to internal static in ExecuteQueryRetryHelper - Changed BuildPagedViewXml to internal static in SharePointPaginationHelper - Created ExecuteQueryRetryHelperTests: 5 tests (throttle true x3, non-throttle false, nested false) - Created SharePointPaginationHelperTests: 5 tests (null, empty, whitespace, replace, append)
This commit is contained in:
@@ -36,7 +36,7 @@ public static class ExecuteQueryRetryHelper
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsThrottleException(Exception ex)
|
||||
internal static bool IsThrottleException(Exception ex)
|
||||
{
|
||||
var msg = ex.Message;
|
||||
return msg.Contains("429") || msg.Contains("503") ||
|
||||
|
||||
@@ -36,7 +36,7 @@ public static class SharePointPaginationHelper
|
||||
while (query.ListItemCollectionPosition != null);
|
||||
}
|
||||
|
||||
private static string BuildPagedViewXml(string? existingXml, int rowLimit)
|
||||
internal static string BuildPagedViewXml(string? existingXml, int rowLimit)
|
||||
{
|
||||
// Inject or replace RowLimit in existing CAML, or create minimal view
|
||||
if (string.IsNullOrWhiteSpace(existingXml))
|
||||
|
||||
Reference in New Issue
Block a user