public void ExecuteWithoutPeaks()
        {
            IDataProvider realDataProvider = new ProteoWizardDataProvider(mockEventAggregator.Object);
            realDataProvider.Open(Properties.Settings.Default.mzXMLTestFile1, 0);
            IXYData xyData = realDataProvider.GetSpectrum(1.5, 1.5, 298, 300, 0.1);
            outputEvent.Subscribe(OnPublishWithoutPeaks);

            IList<MSPeak> peaks = spectralPeakDetection.Execute(xyData);

            Assert.AreEqual(0, peaks.Count);
            Assert.AreEqual(2, messageCount);
            Assert.AreEqual(true, publishCalled);
        }
        public void ExecuteOnSpectrum()
        {
            IDataProvider realDataProvider = new ProteoWizardDataProvider(mockEventAggregator.Object);
            realDataProvider.Open(Properties.Settings.Default.mzXMLTestFile1, 0);
            IXYData xyData = realDataProvider.GetSpectrum(1.5, 1.5, 298, 302, 0.1);
            SetupOutputEvents();

            IXYData smoothedXYData = smoothing.Execute(xyData);

            Assert.AreEqual(xyData.XValues.Count, smoothedXYData.XValues.Count);
            Assert.AreEqual(37, xyData.YValues[14]);
            Assert.AreEqual(15.47619, Math.Round(smoothedXYData.YValues[14], 5));
            Assert.AreEqual(true, publishCalled);
            Assert.AreEqual(true, clickablePublishCalled);
        }
        public void Execute()
        {
            IDataProvider realDataProvider = new ProteoWizardDataProvider(mockEventAggregator.Object);
            realDataProvider.Open(Properties.Settings.Default.mzXMLTestFile1, 0);
            IXYData xyData = realDataProvider.GetTotalIonChromatogram(TimeUnit.Seconds);
            outputEvent.Subscribe(OnPublish);

            IList<ChromatographicPeak> peaks = chromatographicPeakDetection.Execute(xyData);

            Assert.AreEqual(1, peaks.Count);
            Assert.AreEqual(7.58158, Math.Round(peaks[0].Rt, 5));
            Assert.AreEqual(69884, peaks[0].PeakHeight);
            Assert.AreEqual(3, messageCount);
            Assert.AreEqual(true, publishCalled);
        }
        public void Execute()
        {
            IDataProvider realDataProvider = new ProteoWizardDataProvider(mockEventAggregator.Object);
            realDataProvider.Open(Properties.Settings.Default.mzXMLTestFile1, 0);
            IXYData xyData = realDataProvider.GetSpectrum(1.5, 1.5, 298, 302, 0.1);
            outputEvent.Subscribe(OnPublish);

            IList<MSPeak> peaks = spectralPeakDetection.Execute(xyData);

            Assert.AreEqual(2, peaks.Count);
            Assert.AreEqual(301.11931, Math.Round(peaks[0].MZ, 5));
            Assert.AreEqual(18, peaks[0].Intensity);
            Assert.AreEqual(301.13492, Math.Round(peaks[1].MZ, 5));
            Assert.AreEqual(37, peaks[1].Intensity);
            Assert.AreEqual(4, messageCount);
            Assert.AreEqual(true, publishCalled);
        }
 private IXYData LoadChromatogram()
 {
     IDataProvider realDataProvider = new ProteoWizardDataProvider(mockEventAggregator.Object);
     realDataProvider.Open(Properties.Settings.Default.mzXMLTestFile1, 0);
     IXYData xyData = realDataProvider.GetTotalIonChromatogram(TimeUnit.Seconds);
     SetupOutputEvents();
     return xyData;
 }