Interface updated. MockGraphService struct removed from the helper_test.go

This commit is contained in:
Danny Adams 2023-01-06 16:18:56 -05:00
parent 886015126a
commit 9ab2d96451
2 changed files with 15 additions and 19 deletions

View File

@ -3,6 +3,8 @@ package sharepoint
import (
"testing"
absser "github.com/microsoft/kiota-abstractions-go/serialization"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
"github.com/microsoftgraph/msgraph-sdk-go/models"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
@ -41,6 +43,18 @@ type SharePointLibrariesSuite struct {
suite.Suite
}
func (suite *SharePointLibrariesSuite) Client() *msgraphsdk.GraphServiceClient {
return nil
}
func (suite *SharePointLibrariesSuite) Adapter() *msgraphsdk.GraphRequestAdapter {
return nil
}
func (suite *SharePointLibrariesSuite) Serialize(object absser.Parsable) ([]byte, error) {
return nil, nil
}
func TestSharePointLibrariesSuite(t *testing.T) {
suite.Run(t, new(SharePointLibrariesSuite))
}
@ -92,7 +106,7 @@ func (suite *SharePointLibrariesSuite) TestUpdateCollections() {
site,
onedrive.SharePointSource,
testFolderMatcher{test.scope},
&MockGraphService{},
suite,
nil,
control.Options{})
err := c.UpdateCollections(ctx, "driveID", test.items)

View File

@ -3,7 +3,6 @@ package sharepoint
import (
"testing"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
@ -12,23 +11,6 @@ import (
"github.com/alcionai/corso/src/pkg/account"
)
// ---------------------------------------------------------------------------
// SharePoint Test Services
// ---------------------------------------------------------------------------
type MockGraphService struct{}
//------------------------------------------------------------
// Interface Functions: @See graph.Service
//------------------------------------------------------------
func (ms *MockGraphService) Client() *msgraphsdk.GraphServiceClient {
return nil
}
func (ms *MockGraphService) Adapter() *msgraphsdk.GraphRequestAdapter {
return nil
}
// ---------------------------------------------------------------------------
// Helper Functions
// ---------------------------------------------------------------------------