You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/BasicChecks.cs
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ namespace CheckTestOutput
7
7
{
8
8
publicstaticclassBasicChecks
9
9
{
10
+
/// <summary> Verifies that the provided <paramref name="output" /> equals to the `outputDirectory/TestClass.TestMethod.txt` file. </summary>
11
+
/// <param name="checkName"> If not null, checkName will be appended to the calling <paramref name="memberName" />. Intended to be used when having multiple checks in one method. </param>
10
12
publicstaticvoidCheckString(
11
13
thisOutputCheckert,
12
14
stringoutput,
@@ -23,6 +25,8 @@ public static void CheckString(
23
25
);
24
26
}
25
27
28
+
/// <summary> Verifies that the provided <paramref name="output" /> equals to the `outputDirectory/TestClass.TestMethod.txt` file. File is compared line-by-line. </summary>
29
+
/// <param name="checkName"> If not null, checkName will be appended to the calling <paramref name="memberName" />. Intended to be used when having multiple checks in one method. </param>
Copy file name to clipboardExpand all lines: src/JsonChecks.cs
+27-3Lines changed: 27 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,10 @@ namespace CheckTestOutput
9
9
{
10
10
publicstaticclassJsonChecks
11
11
{
12
+
/// <summary> Verifies that the provided object <paramref name="output" />, serialized as Json using System.Text.Json, is equal to the `outputDirectory/TestClass.TestMethod.json` file. </summary>
13
+
/// <param name="jsonOptions"> Json serialization options will be passed to <see cref="JsonSerializer.Serialize{TValue}(TValue, JsonSerializerOptions?)" />. </param>
14
+
/// <param name="normalizePropertyOrder"> If true, object properties will be sorted alphabetically. </param>
15
+
/// <param name="checkName"> If not null, checkName will be appended to the calling <paramref name="memberName" />. Intended to be used when having multiple checks in one method. </param>
12
16
publicstaticvoidCheckJsonObject(
13
17
thisOutputCheckert,
14
18
objectoutput,
@@ -20,8 +24,7 @@ public static void CheckJsonObject(
Copy file name to clipboardExpand all lines: src/OutputChecker.cs
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ namespace CheckTestOutput
10
10
{
11
11
publicclassOutputChecker
12
12
{
13
+
/// <summary> Checks that the provided test output matched a file from the <paramref name="directory"/>. Filename is a {callingClass}.{callingMethod}.fileExtension </summary>
13
14
/// <param name="directory">Directory with the reference outputs, relative to the <see cref="calledFrom"/> parameter.</param>
14
15
/// <param name="sanitizeGuids">Replace all strings that look like Guid by a sequential id. The sanitization preserves equality.</param>
15
16
/// <param name="sanitizeQuotedGuids">Replace all strings that look like Guid and are in quotes by a sequential id. The sanitization preserves equality.</param>
thrownewException($"{Path.GetFileName(filename)} is not explicitly accepted - the file is untracked in git. View the file and stage to let this test pass. Confused? See https://github.com/exyi/CheckTestOutput/blob/master/trouble.md#untracked-file\n");
197
+
thrownewException($"{Path.GetFileName(filename)} is not explicitly accepted - the file is untracked in git. To let this test pass, view the file and stage it. Confused? See https://github.com/exyi/CheckTestOutput/blob/master/trouble.md#untracked-file\n");
196
198
thrownewException(
197
199
$"{Path.GetFileName(filename)} has changed, the actual output differs from the previous accepted output:\n\n"+
198
200
string.Join("\n",diff)+"\n\n"+
199
-
"If this change OK? Stage the file in git to let the test pass. Confused? See https://github.com/exyi/CheckTestOutput/blob/master/trouble.md#changed-file\n"
201
+
"If this change OK? To let the test pass, stage the file in git. Confused? See https://github.com/exyi/CheckTestOutput/blob/master/trouble.md#changed-file\n"
0 commit comments