コード例 #1
0
        public void MzParserConstructorTest()
        {
            string   fileLocation = "..\\..\\..\\TestData\\QC_Standards_Excerpt.mzXML";
            MzParser target       = new MzParser(fileLocation);

            Assert.IsNotNull(target, "Target is null on an existing file.  Did that data move?");
            try
            {
                target = new MzParser("..\\..\\..\\TestData\\QC_Standards_Excerpt_syn");
            }
            catch (Exception)
            {
                target = null;
            }
            Assert.IsNull(target, "Exception not thrown.  File should not open if there is not a matching file extention of \".mzXML\" or \".mzData\"");
            try
            {
                target = new MzParser("");
            }
            catch (Exception)
            {
                target = null;
            }
            Assert.IsNull(target, "Exception not thrown.  MzParser does should not accept an empty string value for the file location.");
            // TODO: NEED TO RUN A .mzData
        }
コード例 #2
0
        public void ActualListBuilderConstructorTest()
        {
            int scanNumber = 0;                                                                                    // TODO: Initialize to an appropriate value
            IExperimentParser experimentParser = new MzParser("..\\..\\..\\TestData\\QC_Standards_Excerpt.mzXML"); // TODO: Initialize to an appropriate value
            ActualListBuilder target           = new ActualListBuilder(scanNumber, experimentParser);

            Assert.Inconclusive("TODO: Implement code to verify target");
        }
コード例 #3
0
        public void GetExperimentDataByScanNumberTest()
        {
            string            fileLocation = "..\\..\\..\\TestData\\QC_Standards_Excerpt.mzXML";
            IExperimentParser target       = new MzParser(fileLocation);
            int            scanNum         = 7382;
            List <Element> actual          = target.GetExperimentDataByScanNumber(scanNum);

            Assert.AreEqual <int>(528, actual.Count, "Length of output is unexpected, is there new test data?");
        }