1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 02:25:50 +01:00

Update mockito to 5.12.0

This commit is contained in:
José Rebelo 2024-07-03 18:51:46 +01:00
parent bfe6c7617a
commit 7c665f997b
3 changed files with 9 additions and 9 deletions

View File

@ -204,7 +204,7 @@ dependencies {
implementation 'androidx.camera:camera-view:1.2.3' implementation 'androidx.camera:camera-view:1.2.3'
implementation 'androidx.camera:camera-lifecycle:1.2.3' implementation 'androidx.camera:camera-lifecycle:1.2.3'
testImplementation "junit:junit:4.13.2" testImplementation "junit:junit:4.13.2"
testImplementation "org.mockito:mockito-core:2.28.2" testImplementation "org.mockito:mockito-core:5.12.0"
testImplementation "org.robolectric:robolectric:4.12.2" testImplementation "org.robolectric:robolectric:4.12.2"
testImplementation "org.hamcrest:hamcrest-library:2.2" testImplementation "org.hamcrest:hamcrest-library:2.2"
testImplementation "com.google.code.gson:gson:2.8.9" testImplementation "com.google.code.gson:gson:2.8.9"

View File

@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.service.devices.huawei; package nodomain.freeyourgadget.gadgetbridge.service.devices.huawei;
import static org.mockito.Matchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.times; import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
@ -29,7 +29,7 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner; import org.mockito.junit.MockitoJUnitRunner;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View File

@ -6,7 +6,7 @@ import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times; import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import org.junit.Before; import org.junit.Before;
@ -49,7 +49,7 @@ public class MessageBuilderTest {
// assert; // assert;
assertFalse(result); assertFalse(result);
verifyZeroInteractions(supportMock); verifyNoInteractions(supportMock);
} }
@Test @Test
@ -64,7 +64,7 @@ public class MessageBuilderTest {
// assert; // assert;
assertTrue(result); assertTrue(result);
verify(messageFactoryMock, times(1)).createMessageFromRawData(data); verify(messageFactoryMock, times(1)).createMessageFromRawData(data);
verifyZeroInteractions(supportMock); verifyNoInteractions(supportMock);
} }
@Test @Test
@ -79,7 +79,7 @@ public class MessageBuilderTest {
// assert; // assert;
assertFalse(result); assertFalse(result);
verify(messageFactoryMock, never()).createMessageFromRawData(data); verify(messageFactoryMock, never()).createMessageFromRawData(data);
verifyZeroInteractions(supportMock); verifyNoInteractions(supportMock);
} }
@Test @Test
@ -100,7 +100,7 @@ public class MessageBuilderTest {
verify(messageFactoryMock, never()).createMessageFromRawData(data1); verify(messageFactoryMock, never()).createMessageFromRawData(data1);
verify(messageFactoryMock, never()).createMessageFromRawData(data2); verify(messageFactoryMock, never()).createMessageFromRawData(data2);
verify(messageFactoryMock, times(1)).createMessageFromRawData(dataComplete); verify(messageFactoryMock, times(1)).createMessageFromRawData(dataComplete);
verifyZeroInteractions(supportMock); verifyNoInteractions(supportMock);
} }
@Test @Test
@ -121,7 +121,7 @@ public class MessageBuilderTest {
verify(messageFactoryMock, never()).createMessageFromRawData(data1); verify(messageFactoryMock, never()).createMessageFromRawData(data1);
verify(messageFactoryMock, never()).createMessageFromRawData(data2); verify(messageFactoryMock, never()).createMessageFromRawData(data2);
verify(messageFactoryMock, times(1)).createMessageFromRawData(dataComplete); verify(messageFactoryMock, times(1)).createMessageFromRawData(dataComplete);
verifyZeroInteractions(supportMock); verifyNoInteractions(supportMock);
} }
@Test @Test