public virtual OutputSelections Clone()
        {
            var clone = new OutputSelections();

            clone.UpdatePropertiesFrom(this, null);
            return(clone);
        }
        protected override void Context()
        {
            base.Context();
            _cloner  = A.Fake <ICloneManager>();
            _output1 = new QuantitySelection("A", QuantityType.Drug);
            _output2 = new QuantitySelection("B", QuantityType.Complex);

            sut.AddOutput(_output1);
            _newOutputSelection = new OutputSelections();
            _newOutputSelection.AddOutput(_output2);
        }
示例#3
0
        protected override Task Context()
        {
            _entitiesInContainerRetriever = A.Fake <IEntitiesInContainerRetriever>();
            _logger = A.Fake <ILogger>();
            sut     = new OutputSelectionsMapper(_entitiesInContainerRetriever, _logger);

            _quantitySelection1 = new QuantitySelection("PATH1", QuantityType.Drug);
            _quantitySelection2 = new QuantitySelection("PATH2", QuantityType.Observer);

            _outputSelections = new OutputSelections();
            _outputSelections.AddOutput(_quantitySelection1);
            _outputSelections.AddOutput(_quantitySelection2);

            _simulation    = new IndividualSimulation();
            _allQuantities = new PathCacheForSpecs <IQuantity>();

            A.CallTo(() => _entitiesInContainerRetriever.QuantitiesFrom(_simulation)).Returns(_allQuantities);

            return(Task.FromResult(true));
        }
示例#4
0
 protected override async Task Because()
 {
     _newOutputSelections = await sut.MapToModel(_snapshot, _simulation);
 }