Skip to content

Commit

Permalink
Merge pull request #794 from liimaorg/update_mockito
Browse files Browse the repository at this point in the history
chore: update to Mockito to 4.11.0
  • Loading branch information
yvespp authored Nov 11, 2024
2 parents 0c47df6 + 22f95d5 commit bc90657
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 20 deletions.
4 changes: 0 additions & 4 deletions AMW_business/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@
<scope>provided</scope>
</dependency>

<!-- Envers -->
<!-- <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-envers</artifactId> <version>3.6.8.Final</version>
</dependency> -->

<!-- JSR-303 (Bean Validation) Implementation -->
<!-- Provides portable constraints such as @Email -->
<!-- Hibernate Validator is shipped in JBoss AS 7 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.*;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyList;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.Mockito.*;

@RunWith(PersistenceTestRunner.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package ch.puzzle.itc.mobiliar.business.deploy.control;

import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;

public class DeploymentExecuterServiceTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
import java.util.logging.Logger;

import static org.junit.Assert.*;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;

public class DeploymentNotificationServiceTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.mockito.MockitoAnnotations;

import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;

public class GeneratorDomainServiceWithAppServerRelationsTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;

public class PermissionBoundaryTest {
Expand Down Expand Up @@ -724,7 +724,7 @@ public void shouldInvokeTheRightMethodOfPermissionServiceToAskForResourceTemplat
// when
permissionBoundary.hasPermissionToAddTemplate(resource);
// then
verify(permissionService, never()).hasPermissionToAddResourceTypeTemplate((ResourceTypeEntity) anyObject());
verify(permissionService, never()).hasPermissionToAddResourceTypeTemplate(any(ResourceTypeEntity.class));
verify(permissionService).hasPermissionToAddResourceTemplate(resource);
}

Expand All @@ -737,7 +737,7 @@ public void shouldInvokeTheRightMethodOfPermissionServiceToAskForResourceTypeTem
// when
permissionBoundary.hasPermissionToAddTemplate(type);
// then
verify(permissionService, never()).hasPermissionToAddResourceTemplate((ResourceEntity) anyObject());
verify(permissionService, never()).hasPermissionToAddResourceTemplate(any(ResourceEntity.class));
verify(permissionService).hasPermissionToAddResourceTypeTemplate(type);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public PersistingEntityBuilder(EntityManager entityManager) {

@Override
protected void build() {
// dont build amw by default
// don't build amw by default
}

public PersistingEntityBuilder buildAmw() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.4.6</version>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit bc90657

Please sign in to comment.