Esempio n. 1
0
 public void TestCustomReportsCompatibility()
 {
     TestSmallMolecules = false; // Mixed molecule docs create different report columns
     var myType = typeof (MultiLabelRatioTest);
     var document = ResultsUtil.DeserializeDocument("MultiLabel.sky", myType);
     // ReSharper disable once AssignNullToNotNullAttribute
     var customReports = (ReportSpecList)new XmlSerializer(typeof(ReportSpecList)).Deserialize(
         myType.Assembly.GetManifestResourceStream(myType, "MultiLabelCustomReports.skyr"));
     Assert.AreNotEqual(0, customReports.Count);
     using (var checkReportCompatibility = new CheckReportCompatibility(document))
     {
         checkReportCompatibility.CheckAll();
         foreach (var customReport in customReports)
         {
             checkReportCompatibility.CheckReport(customReport);
         }
     }
 }
Esempio n. 2
0
 public void TestConverted()
 {
     var assembly = typeof(LiveReportPivotTest).Assembly;
     XmlSerializer documentSerializer = new XmlSerializer(typeof(SrmDocument));
     // ReSharper disable once AssignNullToNotNullAttribute
     var document = (SrmDocument)documentSerializer.Deserialize(
         assembly.GetManifestResourceStream(typeof(ReportSpecConverterTest), "silac_1_to_4.sky"));
     XmlSerializer reportSerializer = new XmlSerializer(typeof(ReportSpecList));
     // ReSharper disable once AssignNullToNotNullAttribute
     var reports = (ReportSpecList)
             reportSerializer.Deserialize(assembly.GetManifestResourceStream(typeof(ReportSpecConverterTest),
                 "ResultSummaryPivot.skyr"));
     Assert.AreNotEqual(0, reports.Count);
     using (var checker = new CheckReportCompatibility(document))
     {
         foreach (var report in reports)
         {
             checker.CheckReport(report);
         }
     }
 }
 public void TestPivotIsotopeLabel()
 {
     TestSmallMolecules = false; // Mixed molecule docs create different report columns
     var assembly = typeof(ReportSpecConverterTest).Assembly;
     XmlSerializer documentSerializer = new XmlSerializer(typeof(SrmDocument));
     // ReSharper disable once AssignNullToNotNullAttribute
     var docWithLabel = (SrmDocument)documentSerializer.Deserialize(
         assembly.GetManifestResourceStream(typeof(ReportSpecConverterTest), "HeavyLabeledLeucine.sky"));
     XmlSerializer reportSerializer = new XmlSerializer(typeof(ReportSpecList));
     // ReSharper disable once AssignNullToNotNullAttribute
     var reports = (ReportSpecList)
         reportSerializer.Deserialize(assembly.GetManifestResourceStream(typeof (ReportSpecConverterTest),
             "PivotIsotopeLabel.skyr"));
     Assert.AreNotEqual(0, reports.Count);
     using (var checker = new CheckReportCompatibility(docWithLabel))
     {
         foreach (var report in reports)
         {
             checker.CheckReport(report);
         }
     }
 }