internal void Test() { var config = new XmlDocument(); var context = new Context(); config.Load(@"FlatfileCompare\testConfig.xml"); XmlNode configPart = config.SelectSingleNode("/TestStep"); context.Add("searchDirectory", Directory.GetCurrentDirectory() + @"\FlatfileCompare"); var comparer = new BizUnitCompare.FlatfileCompare.FlatfileCompare(); comparer.Execute(configPart, context); }
public void ExecuteApplicationException2() { var testInstance = new BizUnitCompare.FlatfileCompare.FlatfileCompare(); var testWriter = new StreamWriter(PrepareFileSystem(_testFilesPath + "test.test")); var goalWriter = new StreamWriter(PrepareFileSystem(_testFilesPath + "test.goal")); var outputData = new StringBuilder(); outputData.AppendLine("this is the input"); outputData.AppendLine("should not be touched"); var expectedData = new StringBuilder(); expectedData.AppendLine("this is the input"); expectedData.AppendLine("shOuld not be touched"); testWriter.Write(outputData.ToString()); goalWriter.Write(expectedData.ToString()); testWriter.Dispose(); goalWriter.Dispose(); Assert.Throws<ApplicationException>(delegate { testInstance.Execute(_configPart, _context); }); }