public AddEntityCategoriesFixture(OsdrTestHarness 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; TreeId = Guid.Parse(content); harness.WaitWhileCategoryTreePersisted(TreeId); BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "Chemical-diagram.png", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; FileId = harness.WaitWhileFileProcessed(BlobId); // add category to entity response = harness.JohnApi.PostData($"/api/categoryentities/entities/{FileId}/categories", new List <Guid> { TreeId }).Result; response.EnsureSuccessStatusCode(); harness.WaitWhileCategoryIndexed(FileId.ToString()); }
public DeleteEntityCategoryFixture(OsdrTestHarness 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 ReadEventsBackwardAsyncFromMolFile(OsdrTestHarness fixture, ITestOutputHelper output) : base(fixture, output) { FileId = ProcessRecordsFile(JohnId.ToString(), "Aspirin.mol", new Dictionary <string, object>() { { "parentId", JohnId } }).Result; }
public BlobStorageClientsTestsFixture(OsdrTestHarness harness) { using (var blobStorage = new BlobStorageClient()) { blobStorage.AuthorizeClient("osdr_ml_modeler", "osdr_ml_modeler_secret").Wait(); BlobId = blobStorage.AddResource("CLIENT_ID", "Aspirin.mol", new Dictionary <string, object>() { { "parentId", harness.JohnId }, { "SkipOsdrProcessing", true } }).Result; } }
public BlobStorageTestsFixture(OsdrTestHarness harness) { using (var blobStorage = new BlobStorageClient()) { blobStorage.Authorize("john", "qqq123").Wait(); BlobId = blobStorage.AddResource(harness.JohnId.ToString(), "Aspirin.mol", new Dictionary <string, object>() { { "parentId", harness.JohnId } }).Result; } }
public CreateCategoryTreeFixture(OsdrTestHarness harness) { var categories = new List <TreeNode>() { new TreeNode("Projects", new List <TreeNode>() { new TreeNode("Projects One"), 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); }
public GetEntitiesByCategoryId(OsdrTestHarness harness, ITestOutputHelper output, GetCategoriesIdsByEntityIdFixture fixture) : base(harness, output) { CategoryId = fixture.CategoryId; FileId = fixture.FileId; }
public DeleteEntityCategoryTest(OsdrTestHarness harness, ITestOutputHelper output, DeleteEntityCategoryFixture fixture) : base(harness, output) { RootCategoryId = fixture.RootCategoryId; BlobId = fixture.BlobId; FileId = fixture.FileId; }
public BlobStorageClientsTests(OsdrTestHarness fixture, ITestOutputHelper output, BlobStorageClientsTestsFixture initFixture) : base(fixture, output) { BlobId = initFixture.BlobId; }
public CreateCategoryTree(OsdrTestHarness harness, ITestOutputHelper output, CreateCategoryTreeFixture fixture) : base(harness, output) { CategoryId = fixture.CategoryId; }
public AddEntityCategories(OsdrTestHarness harness, ITestOutputHelper output, AddEntityCategoriesFixture fixture) : base(harness, output) { TreeId = fixture.TreeId; BlobId = fixture.BlobId; FileId = fixture.FileId; }