Refactor: fixed tests after fixing merge conflicts
This commit is contained in:
parent
6266f6763e
commit
3b405ccd84
@ -257,7 +257,7 @@ public class TbGetCustomerAttributeNodeTest {
|
||||
when(ctxMock.getTenantId()).thenReturn(TENANT_ID);
|
||||
|
||||
when(ctxMock.getDeviceService()).thenReturn(deviceServiceMock);
|
||||
doReturn(Futures.immediateFuture(device)).when(deviceServiceMock).findDeviceByIdAsync(eq(TENANT_ID), eq(device.getId()));
|
||||
doReturn(device).when(deviceServiceMock).findDeviceById(eq(TENANT_ID), eq(device.getId()));
|
||||
|
||||
when(ctxMock.getAttributesService()).thenReturn(attributesServiceMock);
|
||||
when(attributesServiceMock.find(eq(TENANT_ID), eq(CUSTOMER_ID), eq(SERVER_SCOPE), argThat(new ListMatcher<>(expectedPatternProcessedKeysList))))
|
||||
|
||||
@ -178,7 +178,7 @@ public class TbGetOriginatorFieldsNodeTest {
|
||||
|
||||
when(ctxMock.getDeviceService()).thenReturn(deviceServiceMock);
|
||||
when(ctxMock.getTenantId()).thenReturn(DUMMY_TENANT_ID);
|
||||
when(deviceServiceMock.findDeviceByIdAsync(eq(DUMMY_TENANT_ID), eq(device.getId()))).thenReturn(Futures.immediateFuture(device));
|
||||
when(deviceServiceMock.findDeviceById(eq(DUMMY_TENANT_ID), eq(device.getId()))).thenReturn(device);
|
||||
|
||||
when(ctxMock.getDbCallbackExecutor()).thenReturn(DB_EXECUTOR);
|
||||
|
||||
@ -221,7 +221,7 @@ public class TbGetOriginatorFieldsNodeTest {
|
||||
|
||||
when(ctxMock.getDeviceService()).thenReturn(deviceServiceMock);
|
||||
when(ctxMock.getTenantId()).thenReturn(DUMMY_TENANT_ID);
|
||||
when(deviceServiceMock.findDeviceByIdAsync(eq(DUMMY_TENANT_ID), eq(device.getId()))).thenReturn(Futures.immediateFuture(device));
|
||||
when(deviceServiceMock.findDeviceById(eq(DUMMY_TENANT_ID), eq(device.getId()))).thenReturn(device);
|
||||
|
||||
when(ctxMock.getDbCallbackExecutor()).thenReturn(DB_EXECUTOR);
|
||||
|
||||
@ -269,7 +269,7 @@ public class TbGetOriginatorFieldsNodeTest {
|
||||
|
||||
when(ctxMock.getDeviceService()).thenReturn(deviceServiceMock);
|
||||
when(ctxMock.getTenantId()).thenReturn(DUMMY_TENANT_ID);
|
||||
when(deviceServiceMock.findDeviceByIdAsync(eq(DUMMY_TENANT_ID), eq(device.getId()))).thenReturn(Futures.immediateFuture(device));
|
||||
when(deviceServiceMock.findDeviceById(eq(DUMMY_TENANT_ID), eq(device.getId()))).thenReturn(device);
|
||||
|
||||
when(ctxMock.getDbCallbackExecutor()).thenReturn(DB_EXECUTOR);
|
||||
|
||||
|
||||
@ -140,7 +140,7 @@ public class EntitiesCustomerIdAsyncLoaderTest {
|
||||
device.setCustomerId(expectedCustomerId);
|
||||
|
||||
when(ctxMock.getDeviceService()).thenReturn(deviceServiceMock);
|
||||
doReturn(Futures.immediateFuture(device)).when(deviceServiceMock).findDeviceByIdAsync(any(), any());
|
||||
doReturn(device).when(deviceServiceMock).findDeviceById(any(), any());
|
||||
when(ctxMock.getDbCallbackExecutor()).thenReturn(DB_EXECUTOR);
|
||||
|
||||
// WHEN
|
||||
|
||||
@ -214,11 +214,11 @@ public class EntitiesFieldsAsyncLoaderTest {
|
||||
|
||||
break;
|
||||
case DEVICE:
|
||||
var device = Futures.immediateFuture(entityDoesNotExist ? null : new Device(new DeviceId(RANDOM_UUID)));
|
||||
var device = entityDoesNotExist ? null : new Device(new DeviceId(RANDOM_UUID));
|
||||
|
||||
when(ctxMock.getDbCallbackExecutor()).thenReturn(DB_EXECUTOR);
|
||||
when(ctxMock.getDeviceService()).thenReturn(deviceServiceMock);
|
||||
doReturn(device).when(deviceServiceMock).findDeviceByIdAsync(eq(TENANT_ID), any());
|
||||
doReturn(device).when(deviceServiceMock).findDeviceById(eq(TENANT_ID), any());
|
||||
|
||||
break;
|
||||
case ALARM:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user