Skip to content

Commit

Permalink
fixing compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Waschndolos committed Nov 30, 2024
1 parent b8b00fc commit 4740658
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;
import org.mockito.Mockito;

import java.util.Arrays;
Expand Down Expand Up @@ -34,7 +35,7 @@ private static List<String> wrongMetricCollectorPeriodsProvider() {
@MethodSource("wrongMetricCollectorPeriodsProvider")
public void shouldGetErrorWhenNotPositiveNumber(String metricCollectorPeriod) throws Descriptor.FormException {
//given
Mockito.when(configuration.configure(any(), any())).thenCallRealMethod();
Mockito.when(configuration.configure(any(StaplerRequest2.class), any())).thenCallRealMethod();
Mockito.when(configuration.doCheckCollectingMetricsPeriodInSeconds(any())).thenCallRealMethod();
JSONObject config = getDefaultConfig();
config.accumulate("collectingMetricsPeriodInSeconds", metricCollectorPeriod);
Expand All @@ -55,7 +56,7 @@ private static List<String> correctMetricCollectorPeriodsProvider() {
@MethodSource("correctMetricCollectorPeriodsProvider")
public void shouldReturnOk(String metricCollectorPeriod) throws Descriptor.FormException {
//given
Mockito.when(configuration.configure(any(), any())).thenCallRealMethod();
Mockito.when(configuration.configure(any(StaplerRequest2.class), any())).thenCallRealMethod();
JSONObject config = getDefaultConfig();
StaplerRequest request = Mockito.mock(StaplerRequest.class);
Mockito.doNothing().when(request).bindJSON(any(Object.class), any(JSONObject.class));
Expand Down

0 comments on commit 4740658

Please sign in to comment.