use of android.printservice.recommendation.IRecommendationsChangeListener in project android_frameworks_base by ResurrectionRemix.
the class IPrintManagerParametersTest method testAddPrintServiceRecommendationsChangeListener.
/**
* test IPrintManager.addPrintServiceRecommendationsChangeListener
*/
@MediumTest
public void testAddPrintServiceRecommendationsChangeListener() throws Exception {
final IRecommendationsChangeListener listener = createMockIPrintServiceRecommendationsChangeListener();
mIPrintManager.addPrintServiceRecommendationsChangeListener(listener, mUserId);
assertException(new Invokable() {
@Override
public void run() throws Exception {
mIPrintManager.addPrintServiceRecommendationsChangeListener(null, mUserId);
}
}, NullPointerException.class);
// Cannot test bad user Id as these tests are allowed to call across users
}
use of android.printservice.recommendation.IRecommendationsChangeListener in project android_frameworks_base by DirtyUnicorns.
the class IPrintManagerParametersTest method testAddPrintServiceRecommendationsChangeListener.
/**
* test IPrintManager.addPrintServiceRecommendationsChangeListener
*/
@MediumTest
public void testAddPrintServiceRecommendationsChangeListener() throws Exception {
final IRecommendationsChangeListener listener = createMockIPrintServiceRecommendationsChangeListener();
mIPrintManager.addPrintServiceRecommendationsChangeListener(listener, mUserId);
assertException(new Invokable() {
@Override
public void run() throws Exception {
mIPrintManager.addPrintServiceRecommendationsChangeListener(null, mUserId);
}
}, NullPointerException.class);
// Cannot test bad user Id as these tests are allowed to call across users
}
use of android.printservice.recommendation.IRecommendationsChangeListener in project android_frameworks_base by DirtyUnicorns.
the class IPrintManagerParametersTest method testRemovePrintServiceRecommendationsChangeListener.
/**
* test IPrintManager.removePrintServicesChangeListener
*/
@MediumTest
public void testRemovePrintServiceRecommendationsChangeListener() throws Exception {
final IRecommendationsChangeListener listener = createMockIPrintServiceRecommendationsChangeListener();
mIPrintManager.addPrintServiceRecommendationsChangeListener(listener, mUserId);
mIPrintManager.removePrintServiceRecommendationsChangeListener(listener, mUserId);
// Removing unknown listeners is a no-op
mIPrintManager.removePrintServiceRecommendationsChangeListener(listener, mUserId);
mIPrintManager.addPrintServiceRecommendationsChangeListener(listener, mUserId);
assertException(new Invokable() {
@Override
public void run() throws Exception {
mIPrintManager.removePrintServiceRecommendationsChangeListener(null, mUserId);
}
}, NullPointerException.class);
// Cannot test bad user Id as these tests are allowed to call across users
}
use of android.printservice.recommendation.IRecommendationsChangeListener in project android_frameworks_base by crdroidandroid.
the class IPrintManagerParametersTest method testRemovePrintServiceRecommendationsChangeListener.
/**
* test IPrintManager.removePrintServicesChangeListener
*/
@MediumTest
public void testRemovePrintServiceRecommendationsChangeListener() throws Exception {
final IRecommendationsChangeListener listener = createMockIPrintServiceRecommendationsChangeListener();
mIPrintManager.addPrintServiceRecommendationsChangeListener(listener, mUserId);
mIPrintManager.removePrintServiceRecommendationsChangeListener(listener, mUserId);
// Removing unknown listeners is a no-op
mIPrintManager.removePrintServiceRecommendationsChangeListener(listener, mUserId);
mIPrintManager.addPrintServiceRecommendationsChangeListener(listener, mUserId);
assertException(new Invokable() {
@Override
public void run() throws Exception {
mIPrintManager.removePrintServiceRecommendationsChangeListener(null, mUserId);
}
}, NullPointerException.class);
// Cannot test bad user Id as these tests are allowed to call across users
}
use of android.printservice.recommendation.IRecommendationsChangeListener in project android_frameworks_base by crdroidandroid.
the class IPrintManagerParametersTest method testAddPrintServiceRecommendationsChangeListener.
/**
* test IPrintManager.addPrintServiceRecommendationsChangeListener
*/
@MediumTest
public void testAddPrintServiceRecommendationsChangeListener() throws Exception {
final IRecommendationsChangeListener listener = createMockIPrintServiceRecommendationsChangeListener();
mIPrintManager.addPrintServiceRecommendationsChangeListener(listener, mUserId);
assertException(new Invokable() {
@Override
public void run() throws Exception {
mIPrintManager.addPrintServiceRecommendationsChangeListener(null, mUserId);
}
}, NullPointerException.class);
// Cannot test bad user Id as these tests are allowed to call across users
}
Aggregations