Skip to content

Commit

Permalink
Add clean up before test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Marcellin committed Sep 18, 2023
1 parent df40b61 commit bf7aed1
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/
package org.gridsuite.sensitivityanalysis.server;

import lombok.SneakyThrows;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -16,6 +19,7 @@
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;

import static com.powsybl.network.store.model.NetworkStoreApi.VERSION;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
Expand All @@ -33,6 +37,13 @@ public class SupervisionControllerTest {
@Autowired
private MockMvc mockMvc;

@SneakyThrows
@Before
public void setup() {
mockMvc.perform(delete("/" + VERSION + "/results"))
.andExpect(status().isOk());
}

@Test
public void testResultCount() throws Exception {
//get the result timeline uuid of the calculation
Expand Down

0 comments on commit bf7aed1

Please sign in to comment.