Update to /connector/sharepoint/helper_test.go

Creates a test update function for the package.
This commit is contained in:
Danny Adams 2023-01-27 15:33:13 -05:00
parent 978acf187d
commit 5ca341eb56

View File

@ -9,6 +9,7 @@ import (
"github.com/alcionai/corso/src/internal/connector/graph"
"github.com/alcionai/corso/src/internal/connector/graph/betasdk"
"github.com/alcionai/corso/src/internal/connector/onedrive"
"github.com/alcionai/corso/src/internal/connector/support"
"github.com/alcionai/corso/src/pkg/account"
)
@ -17,6 +18,16 @@ import (
// ---------------------------------------------------------------------------
type MockGraphService struct{}
type MockUpdater struct {
UpdateState func(*support.ConnectorOperationStatus)
}
func (mu *MockUpdater) UpdateStatus(input *support.ConnectorOperationStatus) {
if mu.UpdateState != nil {
mu.UpdateState(input)
}
}
//------------------------------------------------------------
// Interface Functions: @See graph.Service
//------------------------------------------------------------