public static void MockGetTableHeaderRowAsync(this Mock <IGraphServiceClient> mock, WorkbookRange returnValue)
 {
     mock.Setup(client => client
                .Me
                .Drive
                .Root
                .ItemWithPath(It.IsAny <string>())
                .Workbook
                .Tables[It.IsAny <string>()]
                .HeaderRowRange()
                .Request(null)
                .GetAsync()).Returns(Task.FromResult(returnValue));
 }
예제 #2
0
 public static void MockGetWorksheetWorkbookAsync(this Mock <IGraphServiceClient> mock, WorkbookRange returnValue)
 {
     mock.Setup(client => client
                .Me
                .Drive
                .Root
                .ItemWithPath(It.IsAny <string>())
                .Workbook
                .Worksheets[It.IsAny <string>()]
                .UsedRange()
                .Request(null)
                .GetAsync(It.IsAny <CancellationToken>())).Returns(Task.FromResult(returnValue));
 }
 public static void MockPatchWorksheetAsync(this Mock <IGraphServiceClient> mock, WorkbookRange returnValue)
 {
     mock.Setup(client => client
                .Me
                .Drive
                .Root
                .ItemWithPath(It.IsAny <string>())
                .Workbook
                .Worksheets[It.IsAny <string>()]
                .Range(It.IsAny <string>())
                .Request(null)
                .PatchAsync(It.IsAny <WorkbookRange>())).Returns(Task.FromResult(returnValue));
 }