GhostWatermarkTest.kt

820 B · raw

1package com.peachpasswords.ui.vault23import org.junit.Assert.assertEquals4import org.junit.Test56class GhostWatermarkTest {78    /** The watermark is the FULL title, not just its first character (brief Fix 4). */9    @Test fun entry_detail_ghost_watermark_is_full_title() {10        assertEquals("GitHub", ghostWatermarkText("GitHub"))11        assertEquals("My Bank Account", ghostWatermarkText("My Bank Account"))12        // Multi-byte / emoji titles pass through whole, never truncated to one glyph.13        assertEquals("日本語メモ", ghostWatermarkText("日本語メモ"))14    }1516    /** A blank title falls back to "P" so the hero never renders empty. */17    @Test fun blank_title_falls_back_to_p() {18        assertEquals("P", ghostWatermarkText(""))19        assertEquals("P", ghostWatermarkText("   "))20    }21}