示例#1
0
 public AirTrafficController(IDataCalculator dataCalculator)
 {
     dataCalculator.CalculateEvent += RecieveCalculatedEvent;
     TrackList          = new List <TrackInfo>();
     _seperationChecker = new SeperationChecker(); //disse bør ikke oprettes her, men injecteres fra main
     _conditionViewer   = new ConsoleViewer();
 }
 public void SetUp()
 {
     _fakeConsolePrint   = Substitute.For <IPrint>();
     _fakeLogPrint       = Substitute.For <IPrint>();
     _fakedataCalculator = Substitute.For <IDataCalculator>();
     _uut = new SeperationChecker(_fakedataCalculator, _fakeLogPrint, _fakeConsolePrint);
 }
示例#3
0
        public DataPresenter(IDataCalculator datacalc)
        {
            datacalculator = datacalc;

            datacalculator.sendCoordinate += sendCoordinates;
            muscleForce = new List <XYDTO>();
        }
示例#4
0
 ///<inheritdoc cref="IDataRepository"/>
 public DataRepository(IDbContextFactory contextFactory,
                       IEntityResolver <Data> dataResolver,
                       IDataCalculator dataCalculator)
 {
     this.contextFactory = contextFactory;
     this.dataResolver   = dataResolver;
     this.dataCalculator = dataCalculator;
 }
        public void SetUp()
        {
            _conditionViewer   = Substitute.For <IConditionViewer>();
            _seperationChecker = Substitute.For <ISeperationChecker>();
            _dataCalculator    = Substitute.For <IDataCalculator>();

            _uut = new AirTrafficController(_dataCalculator);
        }
        public void SetUp()
        {
            airTrafficEvent_ = null;
            dataCalculator_  = NSubstitute.Substitute.For <IDataCalculator>();
            UUT_             = new CollisionStatus(dataCalculator_);

            UUT_.CollisionStatusEvent += (e, args) => { airTrafficEvent_ = args; };
        }
        public SeperationChecker(IDataCalculator calcedRecieved, IPrint printer1, IPrint printer2)
        {
            this._calcedRecieved = calcedRecieved;

            this._calcedRecieved.CalcedDataReady += CheckDistance;
            _planelist = new List<Plane>();
            _printToLog = printer1;
            _printToConsole = printer2;
        }
示例#8
0
 // TODO WTS: Change the chart as appropriate to your app.
 // For help see http://docs.telerik.com/windows-universal/controls/radchart/getting-started
 public MeasurePage()
 {
     InitializeComponent();
     graphCoordinates = new List <XYDTO>(); //kat
     BC_             = new BlockingCollection <int>();
     producer_       = new producer(BC_);
     dataprocessor_  = new DataProcessor(BC_);
     datacalculator_ = new DataCalculator(dataprocessor_);
     datapresenter_  = new DataPresenter(datacalculator_);
     //zeroPointAdjustment_ = new ZeroPointAdjustment();
     //datapresenter_.sendCoordinate += updateGraph;
     coordinateDownSampling         = new List <double>();
     datapresenter_.sendCoordinate += sampleDown;
     MuscleForceChart.DataContext   = downSampledCoordinate;
 }
 public CollisionStatus(IDataCalculator iDataCalculator)
 {
     iDataCalculator.DataCalculatedEvent += RecieveData;
     collisionStatus_ = false;
 }
示例#10
0
 public Print(IDataCalculator dataCalculator, ILogCollision logCollision)
 {
     dataCalculator.DataCalculatedEvent += ConsolePrint;
     logCollision.DeterminedLogEvent    += ConsolePrintCollision;
 }
示例#11
0
 public void SetUp()
 {
     _fakeTrackInfo        = Substitute.For <ITrackInfo>();
     _uut                  = new DataCalculator(_fakeTrackInfo);
     _uut.CalcedDataReady += (o, a) => { output = a; };
 }