public void CalculateSys_sinusWithAmplityde3and4_SubAkutIsCalled() { DAQSettingsDTO daq = new DAQSettingsDTO(); AutoResetEvent _autoresetevent = new AutoResetEvent(false); ConcurrentQueue <RawData> _dataQueues = new ConcurrentQueue <RawData>(); DeQueue dequeue = new DeQueue(_dataQueues, daq); var alarm = new MuckAlarm(); uut = new CalcSys(daq, _autoresetevent, dequeue, alarm); List <double> data = Generate.Sinusoidal(3000, 1000, 1, 3, 0, 0, 0).ToList(); List <double> data2 = Generate.Sinusoidal(3000, 1000, 1, 4, 0, 0, 0).ToList(); uut.CalculateSys(data); uut.CalculateSys(data2); Assert.That(alarm.CheckSubakutAlarmSysWasCalled, Is.EqualTo(true)); }
public void CalculateSys_sinusWithAmplityde5_sysIs5() { DAQSettingsDTO daq = new DAQSettingsDTO(); AutoResetEvent _autoresetevent = new AutoResetEvent(false); ConcurrentQueue <RawData> _dataQueues = new ConcurrentQueue <RawData>(); DeQueue dequeue = new DeQueue(_dataQueues, daq); var alarm = new MuckAlarm(); uut = new CalcSys(daq, _autoresetevent, dequeue, alarm); List <double> data = Generate.Sinusoidal(3000, 1000, 1, 5, 0, 0, 0).ToList(); uut.CalculateSys(data); Assert.That(uut.GetSys(), Is.EqualTo(5)); }