DATALDAP-21 - Adapt API changes after Mockito 2.7 update.

This commit is contained in:
Oliver Gierke
2017-03-23 22:08:31 +01:00
committed by Mark Paluch
parent 2569ee07eb
commit a873bf1d29

View File

@@ -16,7 +16,7 @@
package org.springframework.data.ldap.repository;
import static org.assertj.core.api.Assertions.*;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
import java.util.Arrays;
@@ -31,7 +31,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.data.domain.Persistable;
import org.springframework.data.ldap.repository.support.SimpleLdapRepository;
import org.springframework.ldap.NameNotFoundException;
@@ -83,7 +83,6 @@ public class SimpleLdapRepositoryTests {
Object expectedEntity = new Object();
when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName());
when(odmMock.getCalculatedId(expectedEntity)).thenReturn(null);
tested.save(expectedEntity);
@@ -97,7 +96,6 @@ public class SimpleLdapRepositoryTests {
LdapName expectedName = LdapUtils.newLdapName("ou=newlocation");
when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName());
when(odmMock.getCalculatedId(expectedEntity)).thenReturn(expectedName);
tested.save(expectedEntity);
@@ -111,7 +109,6 @@ public class SimpleLdapRepositoryTests {
LdapName expectedName = LdapUtils.emptyLdapName();
when(odmMock.getId(expectedEntity)).thenReturn(null);
when(odmMock.getCalculatedId(expectedEntity)).thenReturn(expectedName);
tested.save(expectedEntity);
@@ -125,7 +122,6 @@ public class SimpleLdapRepositoryTests {
when(expectedEntity.isNew()).thenReturn(true);
when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName());
when(odmMock.getCalculatedId(expectedEntity)).thenReturn(null);
tested.save(expectedEntity);
@@ -140,7 +136,6 @@ public class SimpleLdapRepositoryTests {
when(expectedEntity.isNew()).thenReturn(true);
when(odmMock.getId(expectedEntity)).thenReturn(null);
when(odmMock.getCalculatedId(expectedEntity)).thenReturn(expectedName);
tested.save(expectedEntity);
@@ -154,7 +149,6 @@ public class SimpleLdapRepositoryTests {
when(expectedEntity.isNew()).thenReturn(false);
when(odmMock.getId(expectedEntity)).thenReturn(LdapUtils.emptyLdapName());
when(odmMock.getCalculatedId(expectedEntity)).thenReturn(null);
tested.save(expectedEntity);