示例#1
0
        public void SyncFiles_CallsAddOnDocumentStoreWhenDocumentAdded()
        {
            var file = new DropboxFileMock(new byte[] {}, "NewFile.txt", new DateTime(1970, 1, 4, 0, 0, 0, DateTimeKind.Utc));

            dropboxFiles.Add(file);
            dropboxToExactSyncer.SyncFiles();
            exactDocumentStore.Verify(store => store.Add(file), Times.Once);
        }
示例#2
0
        public void SyncFiles_CallsAddOnSyncInfoRepositoryWhenDocumentAdded()
        {
            var file = new DropboxFileMock(new byte[] { }, "NewFile.txt", new DateTime(1970, 1, 4, 0, 0, 0, DateTimeKind.Utc));

            dropboxFiles.Add(file);
            dropboxToExactSyncer.SyncFiles();
            syncInfoRepositoryMock.Verify(sync => sync.Add(It.IsAny <SyncInfo>()), Times.Once);
        }
 public void Initialize()
 {
     fileMock   = new DropboxFileMock(new byte[] {}, "TestFile.txt", new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc));
     clientMock = GetDefaultExactApiMock();
     documentAttachmentServiceMock = GetDefaultExactDocumentAttachmentServiceMock();
     documentCategoryServiceMock   = GetDefaultExactDocumentCategoryServiceMock();
     documentServiceMock           = GetDefaultExactDocumentServiceMock();
 }
示例#4
0
 private void InsertFile(DropboxFileMock file, Guid guid)
 {
     dropboxFiles.Add(file);
     exactDocumentGuids.Add(guid);
     exactSyncInfos.Add(new SyncInfo
     {
         DropboxAccountId = dropboxFileProvider.Object.GetAccountId(),
         DropboxPath      = file.FilePath,
         ExactDivisionId  = exactDocumentStore.Object.GetDivisionId(),
         ExactId          = guid,
         LastModified     = file.Modified
     });
 }