From 9ed74e25ea9740bb5e89d25db25d91780050ea49 Mon Sep 17 00:00:00 2001 From: Cara Fisher Date: Mon, 27 Nov 2023 10:56:00 +0000 Subject: [PATCH] SLVUU: Add database clearing before each ApplicationLayoutIT --- .../integration/ApplicationLayoutIntegrationTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layout-server/src/test/java/org/finos/vuu/layoutserver/integration/ApplicationLayoutIntegrationTest.java b/layout-server/src/test/java/org/finos/vuu/layoutserver/integration/ApplicationLayoutIntegrationTest.java index 154b407bd..c65768159 100644 --- a/layout-server/src/test/java/org/finos/vuu/layoutserver/integration/ApplicationLayoutIntegrationTest.java +++ b/layout-server/src/test/java/org/finos/vuu/layoutserver/integration/ApplicationLayoutIntegrationTest.java @@ -6,6 +6,7 @@ import org.finos.vuu.layoutserver.model.ApplicationLayout; import org.finos.vuu.layoutserver.repository.ApplicationLayoutRepository; import org.finos.vuu.layoutserver.utils.DefaultApplicationLayoutLoader; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -48,6 +49,11 @@ public class ApplicationLayoutIntegrationTest { private DefaultApplicationLayoutLoader mockLoader; private final DefaultApplicationLayoutLoader realLoader = new DefaultApplicationLayoutLoader(); + @BeforeEach + public void setUp() { + repository.deleteAll(); + } + @Test public void getApplicationLayout_noLayoutExists_returns200WithDefaultLayout() throws Exception { when(mockLoader.getDefaultLayout()).thenReturn(realLoader.getDefaultLayout());