public void Setup() { _receivedEventArgs = null; _fakeTransponderReceiverClient = Substitute.For <ITransponderReceiverClient>(); _uut = new CalculateAirplaneData(_fakeTransponderReceiverClient); _uut.UpdatedAirplaneListReady += (o, args) => { _receivedEventArgs = args; }; }
static void Main(string[] args) { // Using the real transponder data receiver var receiver = TransponderReceiverFactory.CreateTransponderDataReceiver(); // Dependency injection with the real TDR var system = new TransponderReceiverClient(receiver); // CalculateAirplaneData Instance var CAD = new CalculateAirplaneData(system); var CD = new CollisionDetection(system); var TR = new TrackRendition(CAD); // Let the real TDR execute in the background while (true) { Thread.Sleep(100); } }