public async Task Setup() { ctx = new DocmsContext(new DbContextOptionsBuilder <DocmsContext>() .UseInMemoryDatabase("BlobsQueriesTests") .Options, new MockMediator()); sut = new BlobsQueries(ctx); ctx.BlobContainers.Add(new BlobContainer() { Path = "path1", Name = "path1", ParentPath = null }); ctx.BlobContainers.Add(new BlobContainer() { Path = "path1/subpath1", Name = "subpath1", ParentPath = "path1" }); ctx.BlobContainers.Add(new BlobContainer() { Path = "path2", Name = "path2", ParentPath = null }); ctx.Blobs.Add(new Blob() { Path = "path1/Blob1.txt", Name = "Blob1.txt", ParentPath = "path1" }); ctx.Blobs.Add(new Blob() { Path = "path1/Blob2.txt", Name = "Blob2.txt", ParentPath = "path1" }); ctx.Blobs.Add(new Blob() { Path = "path2/Blob1.txt", Name = "Blob1.txt", ParentPath = "path2" }); await ctx.SaveChangesAsync(); }
public FilesController(IDataStore storage, IBlobsQueries blobs, IDocumentHistoriesQueries histories) { _storage = storage; _blobs = blobs; _histories = histories; }
public FilesController(IDataStore storage, IBlobsQueries queries) { _storage = storage; _queries = queries; }