C# Class TestLibrary.TestUtils.MockOfIDocumentUtil

Datei anzeigen Open project: OpenDataSpace/CmisSync Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
VerifyContentStream ( IContentStream s, string mimeType, string fileName ) : bool
VerifyDictContainsLastModification ( object>.IDictionary dic, System.DateTime modificationDate ) : bool

Method Details

CreateRemoteDocumentMock() public static method

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
return Mock

CreateRemoteDocumentMock() public static method

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
return Mock

SetupCheckout() public static method

public static SetupCheckout ( this doc, Mock docPWC, string newChangeToken, string newObjectId = null ) : void
doc this
docPWC Mock
newChangeToken string
newObjectId string
return void

SetupContent() public static method

public static SetupContent ( this doc, byte content, string fileName, string mimeType = "application/octet-stream" ) : void
doc this
content byte
fileName string
mimeType string
return void

SetupContentStreamHash() public static method

public static SetupContentStreamHash ( this doc, byte hash, string type = "SHA-1" ) : void
doc this
hash byte
type string
return void

SetupContentStreamHash() public static method

public static SetupContentStreamHash ( this doc, string hashString ) : void
doc this
hashString string
return void

SetupParent() public static method

public static SetupParent ( this doc, IFolder parent ) : void
doc this
parent IFolder
return void

SetupPath() public static method

public static SetupPath ( this doc ) : void
doc this
return void

SetupUpdateModificationDate() public static method

public static SetupUpdateModificationDate ( this doc, System.DateTime oldDate = null ) : void
doc this
oldDate System.DateTime
return void

VerifySetContentStream() public static method

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
return void

VerifySetContentStream() public static method

public static VerifySetContentStream ( this doc, bool overwrite = true, bool refresh = true, string mimeType = null ) : void
doc this
overwrite bool
refresh bool
mimeType string
return void

VerifyUpdateLastModificationDate() public static method

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
return void

VerifyUpdateLastModificationDate() public static method

public static VerifyUpdateLastModificationDate ( this doc, System.DateTime modificationDate, bool refresh = true ) : void
doc this
modificationDate System.DateTime
refresh bool
return void