public void StructuredFilename_Tests(string filename, string title, NamingConvention convention, string regioncode) { var structuredFilename = new StructuredFilename(filename); Assert.Equal(filename, structuredFilename.OriginalFilename); Assert.Equal(convention, structuredFilename.NamingConvention); Assert.Equal(regioncode, structuredFilename.RegionCode); Assert.Equal(title, structuredFilename.Title); }
public override async Task <IEnumerable <SeedTreeAwaitable> > ScrapeAsync(ISeed parent, ILookup <string, SeedContent> rootSeeds, ILookup <string, SeedContent> childSeeds, ILookup <string, SeedContent> siblingSeeds) { if (!this.MimeTypes.Contains(childSeeds["mimetype"].First().Value)) { return(_()); } var structured = new StructuredFilename(parent.Content.Value); return(_("search_title", structured.Title)); }