public TrackReciever(ITransponderReceiver transponderReciever, ITrackObjectifier objectifier, ITrackTransmitter trackTransmitter) { transponderReciever.TransponderDataReady += (o, args) => { trackTransmitter.Transmit(objectifier.Objectify(args.TransponderData)); }; }
public void SetUp() { _dateTimeBuilder = Substitute.For <IDateTimeBuilder>(); //skal evt være den rigtige, da man ellers ikke kan få konverteret dato _uut = new TrackObjectifier(_dateTimeBuilder); _stringList = new List <string>() { "ATR423;39045;12932;14000;20151006213456789" }; _dateTimeBuilder.Build("20151006213456789").Returns(new DateTime(2015, 10, 06, 21, 34, 56, 789)); }
public void SetUp() { _nEventsRecieved = 0; _transponderReceiver = Substitute.For <ITransponderReceiver>(); _trackObjectifier = Substitute.For <ITrackObjectifier>(); _trackTransmitter = Substitute.For <ITrackTransmitter>(); _uut = new TrackReciever(_transponderReceiver, _trackObjectifier, _trackTransmitter); _transponderReceiver.TransponderDataReady += (o, args) => { _nEventsRecieved++; }; }