public ISyncer GetSyncer() { var fileSource = new DropboxRestAPIFileProvider(dropboxOAuthIAccessTokenProvider); var fileDestination = new ExactDocumentStore(exactWebsite, exactOnlineOAuthIAccessTokenProvider); var syncer = new DropboxToExactSyncer(fileSource, fileDestination, syncInfoRepository); return(syncer); }
public void Initialize() { dropboxFiles = new List <DropboxFileMock>(); exactDocumentGuids = new List <Guid>(); exactSyncInfos = new List <SyncInfo>(); dropboxFileProvider = CreateDefaultDropboxFileProviderMock(); syncInfoRepositoryMock = CreateDefaultSyncInfoRepositoryMock(); exactDocumentStore = CreateDefaultExactDocumentStoreMock(); InsertFile(new DropboxFileMock(new byte[] { }, "Text1.txt", new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)), Guid.NewGuid()); InsertFile(new DropboxFileMock(new byte[] { }, "Text2.txt", new DateTime(1970, 1, 2, 0, 0, 0, DateTimeKind.Utc)), Guid.NewGuid()); InsertFile(new DropboxFileMock(new byte[] { }, "Text3.txt", new DateTime(1970, 1, 3, 0, 0, 0, DateTimeKind.Utc)), Guid.NewGuid()); dropboxToExactSyncer = new DropboxToExactSyncer(dropboxFileProvider.Object, exactDocumentStore.Object, syncInfoRepositoryMock.Object); }