From e06cc884d98cb763c5803227e77cf014ba015e53 Mon Sep 17 00:00:00 2001 From: antoineatrhea Date: Thu, 21 Sep 2023 15:24:22 +0200 Subject: [PATCH] Fixed missing TearDown on unit tests --- .../Components/ReferenceData/CategoriesTableTestFixture.cs | 6 ++++++ .../ReferenceData/ParameterTypeTableTestFixture.cs | 7 +++++++ .../ElementDefinitionDetailsTestFixture.cs | 6 ++++++ .../UserManagement/UserManagementTableTestFixture.cs | 6 ++++++ 4 files changed, 25 insertions(+) diff --git a/COMETwebapp.Tests/Components/ReferenceData/CategoriesTableTestFixture.cs b/COMETwebapp.Tests/Components/ReferenceData/CategoriesTableTestFixture.cs index 77d0c28c..22ecc2f6 100644 --- a/COMETwebapp.Tests/Components/ReferenceData/CategoriesTableTestFixture.cs +++ b/COMETwebapp.Tests/Components/ReferenceData/CategoriesTableTestFixture.cs @@ -297,6 +297,12 @@ public void SetUp() this.session.Setup(x => x.ActivePerson).Returns(this.person); } + [TearDown] + public void Teardown() + { + this.context.CleanContext(); + } + [Test] public async Task VerifyOnInitialized() { diff --git a/COMETwebapp.Tests/Components/ReferenceData/ParameterTypeTableTestFixture.cs b/COMETwebapp.Tests/Components/ReferenceData/ParameterTypeTableTestFixture.cs index dcd36fee..4deb4db8 100644 --- a/COMETwebapp.Tests/Components/ReferenceData/ParameterTypeTableTestFixture.cs +++ b/COMETwebapp.Tests/Components/ReferenceData/ParameterTypeTableTestFixture.cs @@ -273,6 +273,13 @@ public void SetUp() this.session.Setup(x => x.ActivePerson).Returns(this.person); } + + [TearDown] + public void Teardown() + { + this.context.CleanContext(); + } + [Test] public async Task VerifyOnInitialized() { diff --git a/COMETwebapp.Tests/Components/SystemRepresentation/ElementDefinitionDetailsTestFixture.cs b/COMETwebapp.Tests/Components/SystemRepresentation/ElementDefinitionDetailsTestFixture.cs index 580b1494..4fb675df 100644 --- a/COMETwebapp.Tests/Components/SystemRepresentation/ElementDefinitionDetailsTestFixture.cs +++ b/COMETwebapp.Tests/Components/SystemRepresentation/ElementDefinitionDetailsTestFixture.cs @@ -75,6 +75,12 @@ public void SetUp() }; } + [TearDown] + public void Teardown() + { + this.context.CleanContext(); + } + [Test] public void VerifyComponent() { diff --git a/COMETwebapp.Tests/Components/UserManagement/UserManagementTableTestFixture.cs b/COMETwebapp.Tests/Components/UserManagement/UserManagementTableTestFixture.cs index a9be347d..4a224ea6 100644 --- a/COMETwebapp.Tests/Components/UserManagement/UserManagementTableTestFixture.cs +++ b/COMETwebapp.Tests/Components/UserManagement/UserManagementTableTestFixture.cs @@ -242,6 +242,12 @@ public void SetUp() this.session.Setup(x => x.ActivePerson).Returns(this.person); } + [TearDown] + public void Teardown() + { + this.context.CleanContext(); + } + [Test] public async Task VerifyActivatingPerson() {