C# Класс TestLibrary.TestUtils.MockOfIDocumentUtil

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateRemoteDocumentMock ( string documentContentStreamId, string id, string name, IFolder parent, long contentLength, byte content = null, string changeToken = "changetoken" ) : Mock
CreateRemoteDocumentMock ( string documentContentStreamId, string id, string name, string parentId, long contentLength, byte content = null, string changeToken = "changetoken" ) : Mock
SetupCheckout ( this doc, Mock docPWC, string newChangeToken, string newObjectId = null ) : void
SetupContent ( this doc, byte content, string fileName, string mimeType = "application/octet-stream" ) : void
SetupContentStreamHash ( this doc, byte hash, string type = "SHA-1" ) : void
SetupContentStreamHash ( this doc, string hashString ) : void
SetupParent ( this doc, IFolder parent ) : void
SetupPath ( this doc ) : void
SetupUpdateModificationDate ( this doc, System.DateTime oldDate = null ) : void
VerifySetContentStream ( this doc, Moq.Times times, bool overwrite = true, bool refresh = true, string mimeType = null ) : void
VerifySetContentStream ( this doc, bool overwrite = true, bool refresh = true, string mimeType = null ) : void
VerifyUpdateLastModificationDate ( this doc, System.DateTime modificationDate, Moq.Times times, bool refresh = true ) : void
VerifyUpdateLastModificationDate ( this doc, System.DateTime modificationDate, bool refresh = true ) : void

Приватные методы

Метод Описание
VerifyContentStream ( IContentStream s, string mimeType, string fileName ) : bool
VerifyDictContainsLastModification ( object>.IDictionary dic, System.DateTime modificationDate ) : bool

Описание методов

CreateRemoteDocumentMock() публичный статический Метод

public static CreateRemoteDocumentMock ( string documentContentStreamId, string id, string name, IFolder parent, long contentLength, byte content = null, string changeToken = "changetoken" ) : Mock
documentContentStreamId string
id string
name string
parent IFolder
contentLength long
content byte
changeToken string
Результат Mock

CreateRemoteDocumentMock() публичный статический Метод

public static CreateRemoteDocumentMock ( string documentContentStreamId, string id, string name, string parentId, long contentLength, byte content = null, string changeToken = "changetoken" ) : Mock
documentContentStreamId string
id string
name string
parentId string
contentLength long
content byte
changeToken string
Результат Mock

SetupCheckout() публичный статический Метод

public static SetupCheckout ( this doc, Mock docPWC, string newChangeToken, string newObjectId = null ) : void
doc this
docPWC Mock
newChangeToken string
newObjectId string
Результат void

SetupContent() публичный статический Метод

public static SetupContent ( this doc, byte content, string fileName, string mimeType = "application/octet-stream" ) : void
doc this
content byte
fileName string
mimeType string
Результат void

SetupContentStreamHash() публичный статический Метод

public static SetupContentStreamHash ( this doc, byte hash, string type = "SHA-1" ) : void
doc this
hash byte
type string
Результат void

SetupContentStreamHash() публичный статический Метод

public static SetupContentStreamHash ( this doc, string hashString ) : void
doc this
hashString string
Результат void

SetupParent() публичный статический Метод

public static SetupParent ( this doc, IFolder parent ) : void
doc this
parent IFolder
Результат void

SetupPath() публичный статический Метод

public static SetupPath ( this doc ) : void
doc this
Результат void

SetupUpdateModificationDate() публичный статический Метод

public static SetupUpdateModificationDate ( this doc, System.DateTime oldDate = null ) : void
doc this
oldDate System.DateTime
Результат void

VerifySetContentStream() публичный статический Метод

public static VerifySetContentStream ( this doc, Moq.Times times, bool overwrite = true, bool refresh = true, string mimeType = null ) : void
doc this
times Moq.Times
overwrite bool
refresh bool
mimeType string
Результат void

VerifySetContentStream() публичный статический Метод

public static VerifySetContentStream ( this doc, bool overwrite = true, bool refresh = true, string mimeType = null ) : void
doc this
overwrite bool
refresh bool
mimeType string
Результат void

VerifyUpdateLastModificationDate() публичный статический Метод

public static VerifyUpdateLastModificationDate ( this doc, System.DateTime modificationDate, Moq.Times times, bool refresh = true ) : void
doc this
modificationDate System.DateTime
times Moq.Times
refresh bool
Результат void

VerifyUpdateLastModificationDate() публичный статический Метод

public static VerifyUpdateLastModificationDate ( this doc, System.DateTime modificationDate, bool refresh = true ) : void
doc this
modificationDate System.DateTime
refresh bool
Результат void