/// <summary>
        /// <see cref="Domain.Core.IRepository{TEntity}"/>
        /// </summary>
        /// <param name="file"><see cref="Application.BoundedConext.Blob"/></param>
        public Task UploadBlobAsync(BlobAggregate file)
        {

            this._blobRepository.Add(file);

            return this._blobRepository.UnitOfWork.CommitAsync();
        }
Example #2
0
        public async Task  BlobManagementServicesTests_Should_upload_ExistingFile()
        {
            BlobAggregate blob = new BlobAggregate();
            blob.FileName = "TestImage.jpg";
            blob.DirectoryName = "TestFiles";
            blob.Content = File.OpenRead(@"TestImage.jpg");

            IBlobManagementServices manager = IoCFactory.Instance.CurrentContainer.Resolve<IBlobManagementServices>();
           await manager.UploadBlobAsync(blob);

           Assert.IsNotNull(blob);
           
        }