Files
WireMock.Net-wiremock/test/WireMock.Net.Tests/TestUtils.cs
Stef Heyenrath f358f13c08 Solved issues #204 #205 #200
* Lower priority from Proxy mappings

* Fix codefactor

* extra tests

* #205

* Fix test for linux

* `c:\temp\x.json` fix

* Extra tests

* more tests

* more tests

* codefactor

* #200

* refactor

* refactor

* tests
2018-09-22 08:41:24 +02:00

14 lines
375 B
C#

using System.Reflection;
namespace WireMock.Net.Tests
{
public static class TestUtils
{
public static T GetPrivateFieldValue<T>(this object obj, string fieldName)
{
var field = obj.GetType().GetTypeInfo().GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance);
return (T)field.GetValue(obj);
}
}
}