Interface updated. MockGraphService struct removed from the helper_test.go
This commit is contained in:
parent
886015126a
commit
9ab2d96451
@ -3,6 +3,8 @@ package sharepoint
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"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/microsoftgraph/msgraph-sdk-go/models"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
@ -41,6 +43,18 @@ type SharePointLibrariesSuite struct {
|
|||||||
suite.Suite
|
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) {
|
func TestSharePointLibrariesSuite(t *testing.T) {
|
||||||
suite.Run(t, new(SharePointLibrariesSuite))
|
suite.Run(t, new(SharePointLibrariesSuite))
|
||||||
}
|
}
|
||||||
@ -92,7 +106,7 @@ func (suite *SharePointLibrariesSuite) TestUpdateCollections() {
|
|||||||
site,
|
site,
|
||||||
onedrive.SharePointSource,
|
onedrive.SharePointSource,
|
||||||
testFolderMatcher{test.scope},
|
testFolderMatcher{test.scope},
|
||||||
&MockGraphService{},
|
suite,
|
||||||
nil,
|
nil,
|
||||||
control.Options{})
|
control.Options{})
|
||||||
err := c.UpdateCollections(ctx, "driveID", test.items)
|
err := c.UpdateCollections(ctx, "driveID", test.items)
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package sharepoint
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
@ -12,23 +11,6 @@ import (
|
|||||||
"github.com/alcionai/corso/src/pkg/account"
|
"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
|
// Helper Functions
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user