Exemplo n.º 1
0
        protected override async Task Context()
        {
            await base.Context();

            _refSimulation         = new Simulation().WithName("REF_SIM");
            _refLocalizedParameter = new LocalizedParameter {
                Path = "Organism|P", Value = 10
            };

            _simulationParameterSwap = new SimulationParameterSwap
            {
                Simulation        = _refSimulation.Name,
                Path              = _refLocalizedParameter.Path,
                TargetSimulations = new[] { "DOES NOT EXIST" },
                SnapshotFile      = "RefSnapshotPath"
            };

            _refSimulation.Parameters = new[] { _refLocalizedParameter };
            _qualificationConfiguration.SimulationParameters = new[] { _simulationParameterSwap };

            _refSnapshotProject = new SnapshotProject {
                Simulations = new[] { _refSimulation }
            };

            A.CallTo(() => _snapshotTask.LoadSnapshotFromFile <SnapshotProject>(_simulationParameterSwap.SnapshotFile)).Returns(_refSnapshotProject);
        }
Exemplo n.º 2
0
        protected override async Task Context()
        {
            await base.Context();

            _buildingBlockSwap = new BuildingBlockSwap
            {
                Name         = "Ind",
                Type         = PKSimBuildingBlockType.Individual,
                SnapshotFile = "RefSnapshotPath.json"
            };

            _qualificationConfiguration.BuildingBlocks = new[] { _buildingBlockSwap };
            _refSnapshotProject = new SnapshotProject();
            A.CallTo(() => _snapshotTask.LoadSnapshotFromFile <SnapshotProject>(_buildingBlockSwap.SnapshotFile)).Returns(_refSnapshotProject);
        }
Exemplo n.º 3
0
        protected override async Task Context()
        {
            await base.Context();

            _simulationParameterSwap = new SimulationParameterSwap
            {
                Simulation        = "DOES_NOT_EXIST",
                TargetSimulations = new[] { "DOES NOT EXIST" },
                SnapshotFile      = "RefSnapshotPath"
            };

            _qualificationConfiguration.SimulationParameters = new[] { _simulationParameterSwap };

            _refSnapshotProject = new SnapshotProject();

            A.CallTo(() => _snapshotTask.LoadSnapshotFromFile <SnapshotProject>(_simulationParameterSwap.SnapshotFile)).Returns(_refSnapshotProject);
        }
Exemplo n.º 4
0
        protected override async Task Context()
        {
            await base.Context();

            _runOptions.ConfigurationFile = "XXX";
            A.CallTo(() => _jsonSerializer.Deserialize <QualifcationConfiguration>(_runOptions.ConfigurationFile)).Returns(_qualificationConfiguration);
            _qualificationConfiguration.Project                 = PROJECT_NAME;
            _qualificationConfiguration.OutputFolder            = "c:/tests/outputs/";
            _qualificationConfiguration.InputsFolder            = "c:/tests/outputs/INPUTS";
            _qualificationConfiguration.SnapshotFile            = $"c:/tests/inputs/{PROJECT_SNAPSHOT_NAME}.json";
            _qualificationConfiguration.MappingFile             = $"c:/tests/temp/{PROJECT_NAME}_Mapping.json";
            _qualificationConfiguration.TempFolder              = $"c:/tests/temp";
            _qualificationConfiguration.ReportConfigurationFile = "c:/tests/outputs/report_config.json";
            _qualificationConfiguration.ObservedDataFolder      = "c:/tests/outputs/OBS_DATA_FOLDER";

            _projectSnapshot = new SnapshotProject().WithName(PROJECT_SNAPSHOT_NAME);
            _project         = new PKSimProject().WithName(PROJECT_NAME);
            A.CallTo(() => _snapshotTask.LoadSnapshotFromFile <SnapshotProject>(_qualificationConfiguration.SnapshotFile)).Returns(_projectSnapshot);
            A.CallTo(() => _snapshotTask.LoadProjectFromSnapshot(_projectSnapshot)).Returns(_project);
            FileHelper.FileExists = s => s.IsOneOf(_qualificationConfiguration.SnapshotFile, _runOptions.ConfigurationFile);
        }
        protected override async Task Context()
        {
            await base.Context();

            _refSimulation = new Simulation().WithName("REF_SIM");

            _simulationParameterSwap = new SimulationParameterSwap
            {
                Simulation   = _refSimulation.Name,
                Path         = "DOES NOT EXIST",
                SnapshotFile = "RefSnapshotPath"
            };

            _qualificationConfiguration.SimulationParameters = new[] { _simulationParameterSwap };

            _refSnapshotProject = new SnapshotProject {
                Simulations = new[] { _refSimulation }
            };

            A.CallTo(() => _snapshotTask.LoadSnapshotFromFileAsync <SnapshotProject>(_simulationParameterSwap.SnapshotFile)).Returns(_refSnapshotProject);
        }
Exemplo n.º 6
0
        protected override async Task Context()
        {
            await base.Context();

            _buildingBlockSwap = new BuildingBlockSwap
            {
                Name         = "Ind",
                Type         = PKSimBuildingBlockType.Individual,
                SnapshotFile = "RefSnapshotPath"
            };

            _qualificationConfiguration.BuildingBlocks = new[] { _buildingBlockSwap };
            _originalIndividual          = new Individual().WithName(_buildingBlockSwap.Name);
            _projectSnapshot.Individuals = new[] { _originalIndividual, };

            _refIndividual      = new Individual().WithName(_buildingBlockSwap.Name);
            _refSnapshotProject = new SnapshotProject {
                Individuals = new[] { _refIndividual }
            };

            A.CallTo(() => _snapshotTask.LoadSnapshotFromFile <SnapshotProject>(_buildingBlockSwap.SnapshotFile)).Returns(_refSnapshotProject);
        }