Merge branch 'master' into 'master'

Override getDevice methods in DeviceManagementProviderServiceMock

See merge request entgra/carbon-device-mgt-plugins!40
merge-requests/44/head
Charitha Goonetilleke 6 years ago
commit 736d40a371

@ -127,6 +127,15 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv
} }
} }
@Override
public Device getDevice(String s, boolean b) throws DeviceManagementException {
if (TestUtils.getDeviceId().equals(s)) {
return TestUtils.getDevice();
} else {
return null;
}
}
@Override @Override
public Device getDevice(DeviceIdentifier deviceIdentifier, String s, boolean b) throws DeviceManagementException { public Device getDevice(DeviceIdentifier deviceIdentifier, String s, boolean b) throws DeviceManagementException {
return null; return null;
@ -142,6 +151,14 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv
return null; return null;
} }
@Override
public Device getDevice(String s, Date date, boolean b) throws DeviceManagementException {
if (TestUtils.getDeviceId().equals(s)) {
return TestUtils.getDevice();
} else {
return null;
} }
@Override @Override
public Device getDevice(DeviceIdentifier deviceIdentifier, String s, Date date, boolean b) public Device getDevice(DeviceIdentifier deviceIdentifier, String s, Date date, boolean b)
throws DeviceManagementException { throws DeviceManagementException {

@ -127,6 +127,15 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv
} }
} }
@Override
public Device getDevice(String s, boolean b) throws DeviceManagementException {
if (TestUtils.getDeviceId().equals(s)) {
return TestUtils.getDevice();
} else {
return null;
}
}
@Override @Override
public Device getDevice(DeviceIdentifier deviceIdentifier, String s, boolean b) throws DeviceManagementException { public Device getDevice(DeviceIdentifier deviceIdentifier, String s, boolean b) throws DeviceManagementException {
return null; return null;
@ -142,6 +151,14 @@ public class DeviceManagementProviderServiceMock implements DeviceManagementProv
return null; return null;
} }
@Override
public Device getDevice(String s, Date date, boolean b) throws DeviceManagementException {
if (TestUtils.getDeviceId().equals(s)) {
return TestUtils.getDevice();
} else {
return null;
} }
@Override @Override
public Device getDevice(DeviceIdentifier deviceIdentifier, String s, Date date, boolean b) public Device getDevice(DeviceIdentifier deviceIdentifier, String s, Date date, boolean b)
throws DeviceManagementException { throws DeviceManagementException {

Loading…
Cancel
Save