
org.robolectric.shadows.ShadowRanking Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadows-framework Show documentation
Show all versions of shadows-framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import static org.robolectric.util.reflector.Reflector.reflector;
import android.app.NotificationChannel;
import android.service.notification.NotificationListenerService.Ranking;
import java.util.ArrayList;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
import org.robolectric.util.reflector.Accessor;
import org.robolectric.util.reflector.ForType;
/** Shadow for {@link android.service.notification.NotificationListenerService.Ranking}. */
@Implements(value = Ranking.class)
public class ShadowRanking {
@RealObject private Ranking realObject;
/** Overrides the return value for {@link Ranking#getChannel()}. */
public void setChannel(NotificationChannel notificationChannel) {
reflector(RankingReflector.class, realObject).setChannel(notificationChannel);
}
/** Overrides the return value for {@link Ranking#getSmartReplies()}. */
public void setSmartReplies(ArrayList smartReplies) {
reflector(RankingReflector.class, realObject).setSmartReplies(smartReplies);
}
/** Accessor interface for {@link Ranking}'s internals. */
@ForType(Ranking.class)
interface RankingReflector {
@Accessor("mChannel")
void setChannel(NotificationChannel notificationChannel);
@Accessor("mSmartReplies")
void setSmartReplies(ArrayList smartReplies);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy