Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
kronic committed Oct 30, 2023
1 parent a62fba6 commit decb2d9
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions XmlSchemaClassGenerator.Tests/DocumentationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Schema;

using Xunit;
Expand All @@ -10,6 +11,8 @@ namespace XmlSchemaClassGenerator.Tests;

public sealed class DocumentationTests
{
static DocumentationTests() => Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

private static IEnumerable<string> ConvertXml(string xsd, Generator generatorPrototype)
{
var writer = new MemoryOutputWriter();
Expand Down Expand Up @@ -86,46 +89,28 @@ public void TestSummaryDoc()

Assert.Contains
(
"""
/// <summary>
/// <para>Заголовок конверта.</para>
/// <para>Информация приложения</para>
/// </summary>
""",
"/// <summary>\r\n/// <para>Заголовок конверта.</para>\r\n/// <para>Информация приложения</para>\r\n/// </summary>",
code,
StringComparison.Ordinal
);

Assert.Contains
(
"""
/// <summary>
/// <para>Тип программного обеспечения</para>
/// </summary>
""",
"/// <summary>\r\n/// <para>Тип программного обеспечения</para>\r\n/// </summary>",
code,
StringComparison.Ordinal
);

Assert.Contains
(
"""
/// <summary>
/// <para>Версия программного</para>
/// <para>обеспечения</para>
/// </summary>
""",
"/// <summary>\r\n/// <para>Версия программного</para>\r\n/// <para>обеспечения</para>\r\n/// </summary>",
code,
StringComparison.Ordinal
);

Assert.Contains
(
"""
/// <summary>
/// <para>Тип сообщения</para>
/// </summary>
""",
"/// <summary>\r\n/// <para>Тип сообщения</para>\r\n/// </summary>",
code,
StringComparison.Ordinal
);
Expand Down

0 comments on commit decb2d9

Please sign in to comment.