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

Commit 6a573aec authored by Edgar Wang's avatar Edgar Wang Committed by Android (Google) Code Review
Browse files

Merge "Add test case to check LineBreakWordStyle" into tm-qpr-dev

parents f2f92cd2 3f6e1185
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settingslib.widget;

import static android.graphics.text.LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE;

import static com.google.common.truth.Truth.assertThat;

import android.content.Context;
@@ -97,4 +99,14 @@ public class MainSwitchBarTest {

        assertThat(mBar.getVisibility()).isEqualTo(View.GONE);
    }

    @Test
    public void setTitle_shouldSetCorrectLineBreakStyle() {
        final String title = "title";

        mBar.setTitle(title);
        final TextView textView = ((TextView) mBar.findViewById(R.id.switch_text));

        assertThat(textView.getLineBreakWordStyle()).isEqualTo(LINE_BREAK_WORD_STYLE_PHRASE);
    }
}