Skip to content

Commit 768f892

Browse files
Ensure MappingTestWithGlobalState classes reset mapping config after running
1 parent 7c8aa78 commit 768f892

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Neo4j.Driver/Neo4j.Driver.Tests/Mapping/MappingTestWithGlobalState.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16+
using System;
1617
using Neo4j.Driver.Mapping;
1718
using Xunit;
1819

@@ -24,10 +25,16 @@ public class UsesMappingGlobalState
2425
}
2526

2627
[Collection("UsesMappingGlobalState")]
27-
public class MappingTestWithGlobalState
28+
public class MappingTestWithGlobalState : IDisposable
2829
{
2930
public MappingTestWithGlobalState()
3031
{
3132
RecordObjectMapping.Reset();
3233
}
34+
35+
/// <inheritdoc />
36+
public void Dispose()
37+
{
38+
RecordObjectMapping.Reset();
39+
}
3340
}

0 commit comments

Comments
 (0)