Exemplo n.º 1
0
            public void NotFromTheZipFileShouldNotCreateBlob()
            {
                byte[] data = GetSampleUnknownFile();

                BlobCreation creation = repository.New(data);

                creation.Success.Should().BeFalse();
            }
Exemplo n.º 2
0
        private Response HandlePostBlob()
        {
            using (MemoryStream memory = new MemoryStream())
            {
                Request.Body.CopyTo(memory);
                memory.Seek(0, SeekOrigin.Begin);

                byte[]       content  = memory.ToArray();
                BlobCreation creation = repository.New(content);

                return(ToResponse(creation.GetBlob()));
            }
        }