public DeleteEntityCategoryFixture(OsdrWebTestHarness harness) { var categories = new List <TreeNode>() { new TreeNode("Category Root", new List <TreeNode>() { new TreeNode("My Test Category"), new TreeNode("Projects Two") }) }; var response = harness.JohnApi.PostData("api/categorytrees/tree", categories).Result; var content = response.Content.ReadAsStringAsync().Result; RootCategoryId = Guid.Parse(content); harness.WaitWhileCategoryTreePersisted(RootCategoryId); BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "Chemical-diagram.png", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public UploadValidDocFixture(OsdrWebTestHarness harness) { BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "Developing Standard Approaches for Curating Small Molecule Pharmaceuticals_Jan18_2013.doc", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public UploadGzFixture(OsdrWebTestHarness harness) { BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "wikiAspirin.gz", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public UploadJpgFixture(OsdrWebTestHarness harness) { BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "computer-humor-computer-science.jpg", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public UploadPngFixture(OsdrWebTestHarness harness) { BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "Chemical-diagram.png", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public UploadValidCsvFixture(OsdrWebTestHarness harness) { BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "FocusSynthesis_InStock.csv", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public UploadValidMicroscopyFixture(OsdrWebTestHarness harness) { BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "Nikon_BF007.nd2", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public UploadValidPdfFixture(OsdrWebTestHarness harness) { BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "Abdelaziz A Full_manuscript.pdf", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); }
public AddEntityCategoriesFixture(OsdrWebTestHarness harness) { var categories = new List <TreeNode>() { new TreeNode("Category Root", new List <TreeNode>() { new TreeNode("My Test Category"), new TreeNode("Projects Two") }) }; var response = harness.JohnApi.PostData("api/categorytrees/tree", categories).Result; var content = response.Content.ReadAsStringAsync().Result; CategoryId = Guid.Parse(content); harness.WaitWhileCategoryTreePersisted(CategoryId); BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "Chemical-diagram.png", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); var fileNodeResponse = harness.JohnApi.GetNodeById(FileId).Result; var fileNode = JsonConvert.DeserializeObject <JObject>(fileNodeResponse.Content.ReadAsStringAsync().Result); FileNodeId = Guid.Parse(fileNode.Value <string>("id")); // add category to entity response = harness.JohnApi.PostData($"/api/categoryentities/entities/{FileNodeId}/categories", new List <Guid> { CategoryId }).Result; response.EnsureSuccessStatusCode(); harness.WaitWhileCategoryIndexed(CategoryId.ToString()); }