Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f270006 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a broken test by mocking PackageManager"

parents db0b8bfd f0cfa61c
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -548,8 +548,10 @@ public class TextClassifierTest {
    }

    @Test
    public void testSuggetsConversationActions_deduplicate() {
        if (isTextClassifierDisabled()) return;
    public void testSuggestConversationActions_deduplicate() {
        Context context = new FakeContextBuilder()
                .setIntentComponent(Intent.ACTION_SENDTO, FakeContextBuilder.DEFAULT_COMPONENT)
                .build();
        ConversationActions.Message message =
                new ConversationActions.Message.Builder(
                        ConversationActions.Message.PERSON_USER_OTHERS)
@@ -560,7 +562,8 @@ public class TextClassifierTest {
                        .setMaxSuggestions(3)
                        .build();

        ConversationActions conversationActions = mClassifier.suggestConversationActions(request);
        TextClassifier classifier = new TextClassifierImpl(context, TC_CONSTANTS);
        ConversationActions conversationActions = classifier.suggestConversationActions(request);

        Truth.assertThat(conversationActions.getConversationActions()).isEmpty();
    }