public InvalidCifProcessingImageGenerationFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "InvalidImageGeneration.cif", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
 public ReadEventsBackwardAsyncFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "Aspirin.mol", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #3
0
 public InvalidJdxProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "13Csample.jdx", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #4
0
 public PdfProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessFile(harness.JohnId.ToString(), "Abdelaziz A Full_manuscript.pdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #5
0
 public ImageJpgProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessFile(harness.JohnId.ToString(), "computer-humor-computer-science.jpg", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #6
0
 public CsvProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessFile(harness.JohnId.ToString(), "FocusSynthesis_InStock.csv", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
 public PredictPropertiesInvalidCaseFixture(OsdrTestHarness harness)
 {
     FolderId = harness.PredictProperties("invalid case", "combined lysomotrophic.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #8
0
 public InvalidSdfProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "invalid_sdf_with_20_records_where_first_and_second_are_invalid.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #9
0
 public static void WaitMetadataUpdated(this OsdrTestHarness harness, Guid id)
 {
     if (!harness.Received.Select <Generic.Domain.Events.Files.MetadataPersisted>(m => m.Context.Message.Id == id).Any())
     {
         throw new TimeoutException();
     }
 }
 public SdfProcessingWithOneValidAndOneInvalidRecordsFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "test_solubility.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #11
0
 public ValidCdxProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "125_11Mos.cdx", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #12
0
 public TrainOneModelAndFailBeforeTrainingFixture(OsdrTestHarness harness)
 {
     FolderId = harness.TrainModel(harness.JohnId.ToString(), "drugbank_10_records.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }, { "case", "fail before starting training" }
     }).Result;
 }
Пример #13
0
 public InvalidRxnProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "empty.rxn", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #14
0
 public ValidSdfProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "drugbank_10_records.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #15
0
 public MsWordProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessFile(harness.JohnId.ToString(), "Developing Standard Approaches for Curating Small Molecule Pharmaceuticals_Jan18_2013.doc", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #16
0
 public static void WaitWhileCategoryTreeNodeDeletePersisted(this OsdrTestHarness harness, Guid nodeId)
 {
     if (!harness.Received.Select <CategoryTreeNodeDeletePersisted>(m => m.Context.Message.NodeId == nodeId).Any())
     {
         throw new TimeoutException();
     }
 }
Пример #17
0
 public ValidMolProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "Aspirin.mol", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #18
0
 public ValidJdxProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "2-Methyl-1-Propanol.jdx", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Пример #19
0
 public InvalidCifProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "1100110_modified.cif", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
 public TrainOneValidModelWithFailedOptimizationFixture(OsdrTestHarness harness)
 {
     FolderId = harness.TrainModel(harness.JohnId.ToString(), "combined lysomotrophic.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }, { "case", "train model with failed optimization" }
     }).Result;
 }
 public TrainOneModelAndFailDuringTheTrainingFixture(OsdrTestHarness harness)
 {
     FolderId = harness.TrainModel(harness.JohnId.ToString(), "drugbank_10_records.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }, { "case", "train one model and fail during the training" }
     }).Result;
 }
Пример #22
0
 public TrainOneValidModelFixture(OsdrTestHarness harness)
 {
     FolderId = harness.TrainModel(harness.JohnId.ToString(), "combined lysomotrophic.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }, { "case", "valid one model" }
     }).Result;
 }
Пример #23
0
 public ArchiveGzProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessFile(harness.JohnId.ToString(), "IMG_0109.gz", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
        //public static async Task<bool> DeleteFolder(this BusTestHarness harness, Guid id, Guid userId, int expectedVersion = 0)
        //{
        //    await harness.Bus.Publish<DeleteFolder>(new
        //    {
        //        Id = id,
        //        UserId = userId,
        //        ExpectedVersion = expectedVersion
        //    });

        //    return await harness.WaitWhileAllProcessed();
        //}

        //public static async Task<bool> DeleteFile(this BusTestHarness harness, Guid id, Guid userId, int expectedVersion = 0)
        //{
        //    await harness.Bus.Publish<DeleteFile>(new
        //    {
        //        Id = id,
        //        UserId = userId,
        //        ExpectedVersion = expectedVersion
        //    });

        //    return await harness.WaitWhileAllProcessed();
        //}

        //public static async Task<bool> DeleteRecord(this BusTestHarness harness, Guid id, Guid userId, int expectedVersion = 0)
        //{
        //    await harness.Bus.Publish<DeleteRecord>(new
        //    {
        //        Id = id,
        //        UserId = userId,
        //        ExpectedVersion = expectedVersion
        //    });

        //    return await harness.WaitWhileAllProcessed();
        //}

        public static void WaitWhileBlobLoaded(this OsdrTestHarness harness, Guid blobId)
        {
            if (!harness.Received.Select <BlobLoaded>(m => m.Context.Message.BlobInfo.Id == blobId).Any())
            {
                throw new TimeoutException();
            }
        }
        public static async Task <Guid> PredictProperties(this OsdrTestHarness harness, string bucket, string fileName, IDictionary <string, object> metadata = null)
        {
            var blobId = await harness.JohnBlobStorageClient.AddResource(bucket, fileName, metadata);

            Guid predictionFolderId = Guid.NewGuid();
            Guid correlationId      = Guid.NewGuid();
            Guid modelBlobId        = Guid.NewGuid();

            await harness.BusControl.Publish(new CreatePrediction(
                                                 id : predictionFolderId,
                                                 correlationId : correlationId,
                                                 folderId : predictionFolderId,
                                                 datasetBlobId : blobId,
                                                 datasetBucket : bucket,
                                                 modelBlobId : modelBlobId,
                                                 modelBucket : harness.JohnId.ToString(),
                                                 userId : harness.JohnId
                                                 ));

            if (!harness.Received.Select <MachineLearning.Sagas.Events.PropertiesPredictionFinished>(m => m.Context.Message.Id == predictionFolderId).Any())
            {
                throw new TimeoutException();
            }

            return(predictionFolderId);
        }
        public static async Task <Guid> CreateUser(this OsdrTestHarness harness, string displayName, string firstName, string lastName, string loginName, string email, string avatar, Guid userId)
        {
            Guid id = NewId.NextGuid();

            await harness.CreateUser(id, displayName, firstName, lastName, loginName, email, avatar, userId);

            return(id);
        }
Пример #27
0
        public ImageJpgProcessingFixture(OsdrTestHarness 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);
        }
Пример #28
0
        public ValidCdxProcessingFixture(OsdrTestHarness harness)
        {
            BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "125_11Mos.cdx", new Dictionary <string, object>()
            {
                { "parentId", harness.JohnId }
            }).Result;

            FileId = harness.WaitWhileRecordsFileProcessed(BlobId);
        }
Пример #29
0
        public ArchiveGzProcessingFixture(OsdrTestHarness harness)
        {
            BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "wikiAspirin.gz", new Dictionary <string, object>()
            {
                { "parentId", harness.JohnId }
            }).Result;

            FileId = harness.WaitWhileFileProcessed(BlobId);
        }
Пример #30
0
        public InvalidCifProcessingFixture(OsdrTestHarness harness)
        {
            BlobId = harness.JohnBlobStorageClient.AddResource(harness.JohnId.ToString(), "1100110_modified.cif", new Dictionary <string, object>()
            {
                { "parentId", harness.JohnId }
            }).Result;

            FileId = harness.WaitWhileRecordsFileProcessed(BlobId);
        }