Beispiel #1
0
 public void ReceiverOnTransponderDataReady(object sender, RawTransponderDataEventArgs e)
 {
     Console.Clear();
     foreach (var data in e.TransponderData)
     {
         TrafficMonitor.Add(data);
     }
     TrafficMonitor.CollisionValidate();
 }
Beispiel #2
0
        public void TestDataInsertedAndRender()
        {
            String time = DateTime.Now.ToString("yyyyMMddHHmmssfff");
            // Setup test data
            List <string> testData = new List <string>();

            testData.Add("ATR423;39045;12932;14000;" + time);
            testData.Add("BCD123;10005;85890;12000;" + time);
            testData.Add("XYZ987;25059;75654;4000;" + time);

            // assign dummy event
            _fakeTransponderReceiver.TransponderDataReady += ReceiverOnTransponderDataReady;

            // Act: Trigger the fake object to execute event invocation
            _fakeTransponderReceiver.TransponderDataReady
                += Raise.EventWith(this, new RawTransponderDataEventArgs(testData));
            _uut.CollisionValidate();

            Assert.AreEqual(2, _uut.GetTracks().getInstances().Count);
        }