Skip to content

Commit

Permalink
Add upsert
Browse files Browse the repository at this point in the history
  • Loading branch information
johanah29 committed Jan 3, 2025
1 parent acdcd58 commit c240f6a
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions openbas-api/src/test/java/io/openbas/rest/TeamApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
import io.openbas.utils.mockUser.WithMockAdminUser;
import io.openbas.utils.mockUser.WithMockObserverUser;
import io.openbas.utils.mockUser.WithMockPlannerUser;

import jakarta.servlet.ServletException;
import java.util.ArrayList;
import java.util.List;

import jakarta.servlet.ServletException;
import org.junit.jupiter.api.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
Expand All @@ -45,21 +43,14 @@
@TestInstance(PER_CLASS)
public class TeamApiTest {

@Autowired
private MockMvc mvc;

@Autowired
private ScenarioService scenarioService;
@Autowired
private ScenarioRepository scenarioRepository;
@Autowired
private ExerciseService exerciseService;
@Autowired
private ExerciseRepository exerciseRepository;
@Autowired
private TeamRepository teamRepository;
@Autowired
private UserRepository userRepository;
@Autowired private MockMvc mvc;

@Autowired private ScenarioService scenarioService;
@Autowired private ScenarioRepository scenarioRepository;
@Autowired private ExerciseService exerciseService;
@Autowired private ExerciseRepository exerciseRepository;
@Autowired private TeamRepository teamRepository;
@Autowired private UserRepository userRepository;

static String SCENARIO_ID;
static String TEAM_ID;
Expand Down Expand Up @@ -598,7 +589,8 @@ void upsertContextualTeamTest() throws Exception {
Team teamCreated = this.teamRepository.save(team);
String teamId = teamCreated.getId();

TeamCreateInput teamInput = TeamFixture.createContextualExerciseTeam(List.of(exerciseId1, exerciseId2));
TeamCreateInput teamInput =
TeamFixture.createContextualExerciseTeam(List.of(exerciseId1, exerciseId2));

// --EXECUTE--
Exception exception =
Expand Down

0 comments on commit c240f6a

Please sign in to comment.