Skip to content

Commit 437eeef

Browse files
committed
Fix tests
1 parent 03edb48 commit 437eeef

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Tests/RequestResponseTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ private static IEnumerable<string> generateGetPostFilesOutput(HttpRequest req)
421421
yield return kvp.Key + " => { " + kvp.Value.ContentType + ", " + kvp.Value.Filename + ", \"";
422422
using (var stream = kvp.Value.GetStream())
423423
yield return stream.ReadAllText(Encoding.UTF8);
424-
var field1 = kvp.Value.GetType().GetField("LocalFilename", BindingFlags.NonPublic | BindingFlags.Instance);
425-
yield return "\" (" + (field1 == null ? "null" : field1.GetValue(kvp.Value) == null ? "" : "localfile");
426-
var field2 = kvp.Value.GetType().GetField("Data", BindingFlags.NonPublic | BindingFlags.Instance);
427-
yield return (field2 == null ? "null" : field2.GetValue(kvp.Value) == null ? "" : "data") + ") }\n";
424+
var fldLocalFilename = kvp.Value.GetType().GetField("_localFilename", BindingFlags.NonPublic | BindingFlags.Instance);
425+
yield return "\" (" + (fldLocalFilename == null ? "null" : fldLocalFilename.GetValue(kvp.Value) == null ? "" : "localfile");
426+
var fldData = kvp.Value.GetType().GetField("_data", BindingFlags.NonPublic | BindingFlags.Instance);
427+
yield return (fldData == null ? "null" : fldData.GetValue(kvp.Value) == null ? "" : "data") + ") }\n";
428428
}
429429
}
430430

Tests/UrlPathResolverTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Linq;
23
using System.Net.Sockets;
34
using System.Text;
45
using Microsoft.VisualStudio.TestTools.UnitTesting;

0 commit comments

Comments
 (0)