Skip to content

Commit

Permalink
[backend] Add enabled property to injectInput (#2043)
Browse files Browse the repository at this point in the history
  • Loading branch information
savacano28 authored Dec 23, 2024
1 parent 851370a commit b6df3e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class InjectInput {
@JsonProperty("inject_tags")
private List<String> tagIds = new ArrayList<>();

@JsonProperty("inject_enabled")
private boolean enabled = true;

public Inject toInject(@NotNull final InjectorContract injectorContract) {
Inject inject = new Inject();
inject.setTitle(getTitle());
Expand All @@ -66,6 +69,7 @@ public Inject toInject(@NotNull final InjectorContract injectorContract) {
inject.setAllTeams(isAllTeams());
inject.setCountry(getCountry());
inject.setCity(getCity());
inject.setEnabled(isEnabled());
return inject;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void testCreateScenario_ValidInput() throws Exception {
@Test
@DisplayName(
"Test to validate existence of 'Add Inject to Scenario' endpoint and validate InjectInput")
public void testCreateInjectForScenario_ValidInput() throws Exception {
public void testCreateInjectForScenario_ValidInput_Additional_param() throws Exception {
// -- PREPARE --
String jsonInput =
"{"
Expand All @@ -174,6 +174,7 @@ public void testCreateInjectForScenario_ValidInput() throws Exception {
+ "\"inject_content\": null, "
+ "\"inject_depends_duration\": 100, "
+ "\"inject_tags\": [\"Tag1\"], "
+ "\"inject_enabled\": false, "
+ "\"inject_additional_param\": \"additional_param\""
+ "}";

Expand Down

0 comments on commit b6df3e4

Please sign in to comment.