コード例 #1
0
        protected override void Context()
        {
            base.Context();
            _project = A.Fake <IProject>();
            _parameterIdentification = A.Fake <ParameterIdentification>();
            _context = A.Fake <IMoBiContext>();
            _simulationReferenceUpdater         = A.Fake <ISimulationReferenceUpdater>();
            _simulationParameterOriginIdUpdater = A.Fake <ISimulationParameterOriginIdUpdater>();

            A.CallTo(() => _context.PublishEvent(A <SimulationUnloadEvent> ._))
            .Invokes(x => _event = x.GetArgument <SimulationUnloadEvent>(0));

            A.CallTo(() => _context.Project).Returns(_project);
            A.CallTo(() => _context.Resolve <ISimulationReferenceUpdater>()).Returns(_simulationReferenceUpdater);
            A.CallTo(() => _context.Resolve <ISimulationParameterOriginIdUpdater>()).Returns(_simulationParameterOriginIdUpdater);
            A.CallTo(() => _project.AllParameterIdentifications).Returns(new[] { _parameterIdentification });
            _parameterIdentification.AddSimulation(_simulation);
        }
コード例 #2
0
 public void Handle(SimulationUnloadEvent eventToHandle)
 {
     ClearComparisonIfComparing(eventToHandle.Simulation);
     eventToHandle.Simulation.MoBiBuildConfiguration.AllBuildingBlocks.Each(ClearComparisonIfComparing);
 }