<commit_before>﻿using System.Linq;
using System.Threading.Tasks;
using WikiClientLibrary.Pages.Parsing;
using WikiClientLibrary.Sites;
using WikiClientLibrary.Tests.UnitTestProject1.Fixtures;
using Xunit;
using Xunit.Abstractions;

namespace WikiClientLibrary.Tests.UnitTestProject1.Tests
{

    public class RenderingTests : WikiSiteTestsBase, IClassFixture<WikiSiteProvider>
    {

        /// <inheritdoc />
        public RenderingTests(ITestOutputHelper output, WikiSiteProvider wikiSiteProvider) : base(output, wikiSiteProvider)
        {
        }

        [Fact]
        public async Task WpLzhPageParsingTest1()
        {
            var site = await WpLzhSiteAsync;
            // 一九五二年
            var result = await site.ParseRevisionAsync(240575, ParsingOptions.EffectiveLanguageLinks);
            ShallowTrace(result);
            Assert.Equal("一九五二年", result.Title);
            Assert.Equal("一九五二年", result.DisplayTitle);
            Assert.True(result.LanguageLinks.First(l => l.Language == "en").Title == "1952");
            Assert.True(result.LanguageLinks.First(l => l.Language == "zh").Title == "1952年");
            Assert.Contains("><b>一九五二年</b>，繼<b>", result.Content);
            Assert.Contains(result.Sections, s => s.Heading == "大事");
        }
<commit_msg>Fix failed UT.<commit_after>﻿using System.Linq;
using System.Threading.Tasks;
using WikiClientLibrary.Pages.Parsing;
using WikiClientLibrary.Sites;
using WikiClientLibrary.Tests.UnitTestProject1.Fixtures;
using Xunit;
using Xunit.Abstractions;

namespace WikiClientLibrary.Tests.UnitTestProject1.Tests
{

    public class RenderingTests : WikiSiteTestsBase, IClassFixture<WikiSiteProvider>
    {

        /// <inheritdoc />
        public RenderingTests(ITestOutputHelper output, WikiSiteProvider wikiSiteProvider) : base(output, wikiSiteProvider)
        {
        }

        [Fact]
        public async Task WpLzhPageParsingTest1()
        {
            var site = await WpLzhSiteAsync;
            // 一九五二年
            var result = await site.ParseRevisionAsync(240575, ParsingOptions.EffectiveLanguageLinks);
            ShallowTrace(result);
            Assert.Equal("一九五二年", result.Title);
            Assert.Matches(@"<span class=""[\w-]+"">一九五二年</span>", result.DisplayTitle);
            Assert.True(result.LanguageLinks.First(l => l.Language == "en").Title == "1952");
            Assert.True(result.LanguageLinks.First(l => l.Language == "zh").Title == "1952年");
            Assert.Contains("><b>一九五二年</b>，繼<b>", result.Content);
            Assert.Contains(result.Sections, s => s.Heading == "大事");
        }

{'fraction_non_alphanumeric': 0.1223159509202454, 'fraction_numerical': 0.01303680981595092, 'mean_word_length': 3.013846153846154, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4319229', 'n_tokens_mistral': 818, 'n_tokens_neox': 789, 'n_words': 129}