public void SepCondEvent_ReceivesOneEvent_Only1EventSent() { Track track1 = new Track("123456", 50000, 50000, 10000, DateTime.Now, 150, 90); Track track2 = new Track("654321", 49000, 50000, 10000, DateTime.Now, 150, 90); _tracklist = new List <Track>(); _tracklist.Add(track1); _tracklist.Add(track2); _argsToSend = new ATMSEventArgs { Tracks = _tracklist }; correctRendEventArgs = new RendEventArgs(); var sepcondlistforrenderer = new List <SepCondEventArgs>(); var newsepcond = new SepCondEventArgs(); newsepcond.Track1 = track1; newsepcond.Track2 = track2; newsepcond.TimeOfOccurrence = DateTime.Now; sepcondlistforrenderer.Add(newsepcond); correctRendEventArgs.ListOfCurrentConditions = sepcondlistforrenderer; correctRendEventArgs.TimeOfEvent = DateTime.Now; _atms.DataReady += Raise.EventWith(_argsToSend); _inputoutput.Received(1).Write(Arg.Any <SepCondEventArgs>(), Arg.Any <string>()); }
public void InputOutput_ReceivesOneWrite_FromArgs() { _fakeSeparationCondition.WarningEvent += Raise.EventWith(_argsToSend); _fakeInputOutput.Received(1).Write(_receivedEventArgs, "UnitTestFile.txt"); }