public void TestXMLParameterWriterFeatureFinderOptions(string path) { try { XMLParameterFileWriter writer = new XMLParameterFileWriter(); XMLParamterFileReader reader = new XMLParamterFileReader(); MultiAlignAnalysis analysis = new MultiAlignAnalysis(); analysis.Options.AlignmentOptions.IsAlignmentBaselineAMasstagDB = true; analysis.Options.FeatureFindingOptions = ChangeObjectValues(analysis.Options.FeatureFindingOptions) as MultiAlignCore.Algorithms.FeatureFinding.LCMSFeatureFindingOptions; writer.WriteParameterFile(path, analysis); MultiAlignAnalysis newAnalysis = new MultiAlignAnalysis(); reader.ReadParameterFile(path, ref newAnalysis); Compare(analysis.Options.FeatureFindingOptions, newAnalysis.Options.FeatureFindingOptions); } catch (Exception ex) { throw; } finally { try { bool exists = File.Exists(path); if (exists) { File.Delete(path); } } catch { Console.WriteLine("The file was not deleted."); } } }
public void TestXMLParameterWriterMTDB(string path) { try { XMLParameterFileWriter writer = new XMLParameterFileWriter(); XMLParamterFileReader reader = new XMLParamterFileReader(); MultiAlignAnalysis analysis = new MultiAlignAnalysis(); analysis.Options.MassTagDatabaseOptions = ChangeObjectValues(analysis.Options.MassTagDatabaseOptions) as MultiAlignCore.IO.MTDB.MassTagDatabaseOptions; writer.WriteParameterFile(path, analysis); MultiAlignAnalysis newAnalysis = new MultiAlignAnalysis(); reader.ReadParameterFile(path, ref newAnalysis); Compare(analysis.Options.MassTagDatabaseOptions, newAnalysis.Options.MassTagDatabaseOptions); } catch (Exception ex) { throw; } finally { try { bool exists = File.Exists(path); if (exists) { File.Delete(path); } } catch { Console.WriteLine("The file was not deleted."); } } }