Skip to content

Commit 180c990

Browse files
committed
Remove unused parameter (and use a couple)
1 parent 812df4d commit 180c990

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/IntermediateNodeVerifier.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ private void AssertNodeEquals(IntermediateNode node, IEnumerable<IntermediateNod
8181
int charsVerified = 0;
8282
AssertNestingEqual(node, ancestors, expected, actual, ref charsVerified);
8383
AssertNameEqual(node, ancestors, expected, actual, ref charsVerified);
84-
AssertDelimiter(node, expected, actual, true, ref charsVerified);
84+
AssertDelimiter(expected, actual, true, ref charsVerified);
8585
AssertLocationEqual(node, ancestors, expected, actual, ref charsVerified);
86-
AssertDelimiter(node, expected, actual, false, ref charsVerified);
86+
AssertDelimiter(expected, actual, false, ref charsVerified);
8787
AssertContentEqual(node, ancestors, expected, actual, ref charsVerified);
8888

8989
throw new InvalidOperationException("We can't figure out HOW these two things are different. This is a bug.");
@@ -140,7 +140,7 @@ private static void AssertNameEqual(IntermediateNode node, IEnumerable<Intermedi
140140
}
141141

142142
// Either both strings need to have a delimiter next or neither should.
143-
private static void AssertDelimiter(IntermediateNode node, string expected, string actual, bool required, ref int charsVerified)
143+
private static void AssertDelimiter(string expected, string actual, bool required, ref int charsVerified)
144144
{
145145
if (charsVerified == expected.Length && required)
146146
{
@@ -227,7 +227,7 @@ private static string GetContent(string text, int start)
227227
private class IntermediateNodeBaselineException : XunitException
228228
{
229229
public IntermediateNodeBaselineException(IntermediateNode node, IntermediateNode[] ancestors, string expected, string actual, string userMessage)
230-
: base(Format(node, ancestors, expected, actual, userMessage))
230+
: base(Format(ancestors, expected, actual, userMessage))
231231
{
232232
Node = node;
233233
Expected = expected;
@@ -240,7 +240,7 @@ public IntermediateNodeBaselineException(IntermediateNode node, IntermediateNode
240240

241241
public string Expected { get; }
242242

243-
private static string Format(IntermediateNode node, IntermediateNode[] ancestors, string expected, string actual, string userMessage)
243+
private static string Format(IntermediateNode[] ancestors, string expected, string actual, string userMessage)
244244
{
245245
using var _ = StringBuilderPool.GetPooledObject(out var builder);
246246

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/Intermediate/IntermediateNodeAssert.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,13 @@ internal static void SetTagHelperProperty(
392392
private class IntermediateNodeAssertException : XunitException
393393
{
394394
public IntermediateNodeAssertException(IntermediateNode node, string userMessage)
395-
: base(Format(node, null, null, userMessage))
395+
: base(Format(null, null, userMessage))
396396
{
397397
Node = node;
398398
}
399399

400400
public IntermediateNodeAssertException(IntermediateNode node, IEnumerable<IntermediateNode> nodes, string userMessage)
401-
: base(Format(node, null, nodes, userMessage))
401+
: base(Format(null, nodes, userMessage))
402402
{
403403
Node = node;
404404
Nodes = nodes;
@@ -409,8 +409,10 @@ public IntermediateNodeAssertException(
409409
IEnumerable<IntermediateNode> nodes,
410410
string userMessage,
411411
Exception innerException)
412-
: base(Format(node, null, nodes, userMessage), innerException)
412+
: base(Format(null, nodes, userMessage), innerException)
413413
{
414+
Node = node;
415+
Nodes = nodes;
414416
}
415417

416418
public IntermediateNodeAssertException(
@@ -419,15 +421,17 @@ public IntermediateNodeAssertException(
419421
IEnumerable<IntermediateNode> nodes,
420422
string userMessage,
421423
Exception innerException)
422-
: base(Format(node, ancestors, nodes, userMessage), innerException)
424+
: base(Format(ancestors, nodes, userMessage), innerException)
423425
{
426+
Node = node;
427+
Nodes = nodes;
424428
}
425429

426430
public IntermediateNode Node { get; }
427431

428432
public IEnumerable<IntermediateNode> Nodes { get; }
429433

430-
private static string Format(IntermediateNode node, IntermediateNode[] ancestors, IEnumerable<IntermediateNode> nodes, string userMessage)
434+
private static string Format(IntermediateNode[] ancestors, IEnumerable<IntermediateNode> nodes, string userMessage)
431435
{
432436
using var _ = StringBuilderPool.GetPooledObject(out var builder);
433437
builder.AppendLine(userMessage);

0 commit comments

Comments
 (0)