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 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 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); }