Ejemplo n.º 1
0
        /// <summary>
        /// Verifies the named scenario in the specified embedded resource.
        /// </summary>
        /// <param name="scenarioName">Name of the scenario.</param>
        /// <param name="assembly">The assembly.</param>
        /// <param name="resourceName">Name of the resource.</param>
        /// <param name="stepDefinitions">The assemblies, types, or objects containing step definitions.</param>
        public static void ScenarioInEmbeddedResource(string scenarioName, Assembly assembly, string resourceName, params object[] stepDefinitions)
        {
            var feature = new Feature();

            new PlainTextReader().ReadTo(Read.EmbeddedResource(assembly, resourceName), feature);
            AddStepDefinitions(feature, stepDefinitions);
            feature.Scenarios[scenarioName].Verify();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Reads the embedded resource.
 /// </summary>
 /// <param name="assembly">The assembly.</param>
 /// <param name="name">The name of the embedded resource.</param>
 public void ReadEmbeddedResource(Assembly assembly, string name)
 {
     this.ReadText(Read.EmbeddedResource(assembly, name));
 }