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;
 }
Esempio n. 3
0
 public InvalidJdxProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "13Csample.jdx", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 11
0
 public ValidCdxProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "125_11Mos.cdx", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Esempio n. 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;
 }
Esempio n. 13
0
 public InvalidRxnProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "empty.rxn", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Esempio n. 14
0
 public ValidSdfProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "drugbank_10_records.sdf", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Esempio n. 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;
 }
Esempio n. 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();
     }
 }
Esempio n. 17
0
 public ValidMolProcessingFixture(OsdrTestHarness harness)
 {
     FileId = harness.ProcessRecordsFile(harness.JohnId.ToString(), "Aspirin.mol", new Dictionary <string, object>()
     {
         { "parentId", harness.JohnId }
     }).Result;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }