public void WPBiography() { string a = @"{{WPBiography|foo=yes|living=yes|listas=Foé}}"; Assert.AreEqual(a.Replace(@"é", "e"), TalkPageFixes.WPBiography(a), "diacritics removed from WPBiography listas"); Assert.AreEqual(a.Replace(@"é", "e"), TalkPageFixes.WPBiography(a.Replace(@"é", "e")), "no change when no diacritics in WPBiography listas"); }
public void WPBiographyTopBilling() { string a = @"{{WPBiography|foo=yes|living=yes}} {{WikiProject London}} ", b = @"{{WikiProjectBannerShell|banner collapsed=no|1= {{WPBiography|living=yes|class=Start|priority=|listas=Hill, A}} {{WikiProject Gender Studies}} {{WikiProject Oklahoma}} | blp=yes }}", c = @"{{WPBiography|foo=yes|living=no}} {{WikiProject London}}"; Assert.AreEqual(a, TalkPageFixes.WPBiography(@"{{WikiProject London}} {{WPBiography|foo=yes|living=yes}}"), "WPBiography moved above WikiProjects"); Assert.AreEqual(a, TalkPageFixes.WPBiography(a), "no change when WPBiography ahead of WikiProjects"); Assert.AreEqual(b, TalkPageFixes.WPBiography(b), "no change when WPBS present"); Assert.AreEqual(c, TalkPageFixes.WPBiography(c), "no change when not living"); Assert.AreEqual(c + @"{{blp}}", TalkPageFixes.WPBiography(c + @"{{blp}}"), "no change when not living"); Assert.AreEqual(a, TalkPageFixes.WPBiography(a + @"{{blp}}"), "blp template removed when living=y"); }