Esempio n. 1
0
        public void should_pull_code_example_from_embedded_resource(string filename, string name, string comments, string template)
        {
            var examples = CodeExample.FromEmbeddedResource(ThisAssembly, filename, name);

            examples.Name.ShouldEqual(name ?? filename);
            examples.Comments.ShouldEqual(comments);
            examples.Template.ShouldEqual(template);
        }
Esempio n. 2
0
 /// <summary>
 /// Adds a code example to the documentation from an embedded resource.
 /// These are named as [filename].[md] for comments and [filename].[mustache]
 /// for templates. The name defaults to the filename if not specified.
 /// </summary>
 public Swank WithCodeExampleResource(string filename, string name = null)
 {
     _configuration.CodeExamples.Add(CodeExample.FromEmbeddedResource(
                                         _configuration.AppliesToAssemblies, filename, name));
     return(this);
 }