RetrieveFile() public method

public RetrieveFile ( string filename ) : byte[]
filename string
return byte[]
コード例 #1
0
        public void WhenRetrieveFileInvokedWithValidArguments_AttachmentIsReturnedFromRaven()
        {
            Byte[] fileBytes = new Byte[] { 3, 1, 4, 1, 5, 9 };
            String filename = "images/mySuperDuperFile";

            this.Store.DatabaseCommands.PutAttachment(filename, null, fileBytes, new Newtonsoft.Json.Linq.JObject());

            RavenFileStorageService storage = new RavenFileStorageService(this.Store);
            var retrievedAttachment = storage.RetrieveFile(filename);
            Assert.AreEqual(fileBytes, retrievedAttachment);
        }