public void SetUp() { var writer = new XmlTextWriter(new MemoryStream(), Encoding.UTF8); var listener = new XmlOutputEventListener(writer); CreateBasicConfiguration() .SetEventListener(listener) .SetScenarioFiles(new[] { TestFeatures.FeatureWithFailingStep }) .Build() .Run(); _xmlOut = new XmlDocument(); writer.BaseStream.Seek(0, SeekOrigin.Begin); _xmlOut.Load(writer.BaseStream); }
public virtual void Setup() { var memStream = new MemoryStream(); var listener = new XmlOutputEventListener(new XmlTextWriter(memStream, Encoding.UTF8)); ConfigurationNoAppDomain .New .SetScenarioFiles(_feature) .SetAssemblies(new[] { GetType().Assembly.Location }) .SetEventListener(listener) .Build() .Run(); _xmlDoc = new XmlDocument(); memStream.Seek(0, 0); _xmlDoc.Load(memStream); }
public void SetUp() { var writer = new XmlTextWriter(new MemoryStream(), Encoding.UTF8); var listener = new XmlOutputEventListener(writer); var scenarioText = "Feature: " + FeatureTitle + Environment.NewLine + "Scenario: Reading values from a config file" + Environment.NewLine + "Given an assembly with a matching configuration file" + Environment.NewLine + "When the value of setting foo is read" + Environment.NewLine + "Then the value should be bar"; SetupConfigFile(); runner = CreateTextRunner(new[] { Path.Combine(GetAssemblyLocation(), "TestLib.dll") }, listener, scenarioText); results = runner.Run(); xmlOut = new XmlDocument(); writer.BaseStream.Seek(0, SeekOrigin.Begin); xmlOut.Load(writer.BaseStream); }
public void SetUp() { var writer = new XmlTextWriter(new MemoryStream(), Encoding.UTF8); var listener = new XmlOutputEventListener(writer); const string scenarioText = "Feature: " + FeatureTitle + "\r\n" + "Scenario: Reading values from a config file\r\n" + "Given an assembly with a matching configuration file\r\n" + "When the value of setting foo is read\r\n" + "Then the value should be bar"; SetupConfigFile(); runner = CreateTextRunner(new[] { "TestPlainTextAssembly.dll" }, listener, scenarioText); results = runner.Run(); xmlOut = new XmlDocument(); writer.BaseStream.Seek(0, SeekOrigin.Begin); xmlOut.Load(writer.BaseStream); }