package Ġcom . android . i 1 8 n . address input . k tx Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . test . core . app . Application Provider Ċ import Ġcom . android . i 1 8 n . address input . Address DataMap Loader Ċ import Ġcom . google . common . truth . Truth Ċ import Ġorg . junit . Test Ċ Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ import Ġorg . ro bo lectric . annotation . Config Ċ import Ġjava . util .* Ċ Ċ /** Ċ Ġ* ĠExample Ġlocal Ġunit Ġtest , Ġwhich Ġwill Ġexecute Ġon Ġthe Ġdevelopment Ġmachine Ġ( host ). Ċ Ġ* Ċ Ġ* ĠSee Ġ[ testing Ġdocumentation ]( http :// d . android . com / tools / testing ). Ċ Ġ*/ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ @ Config ( sdk Ġ= Ġ[ 2 3 ], Ġqual ifiers Ġ= Ġ" en - r US ") Ċ class ĠExample UnitTest Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcontext : ĠContext Ġ= ĠApplication Provider . getApplicationContext () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( Address DataMap Loader ( context ). load Immutable DataMap ()). isNotEmpty () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( Locale . getDefault (). country ). isEqualTo (" US ") ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( Locale . getDefault (). isValid Postal Code ( context , Ġ" ")). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( Locale . getDefault (). isValid Postal Code ( context , Ġ" 0 0 0 0 0 ")). isTrue () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( Locale . getDefault (). isValid Postal Code ( context , Ġ" 0 0 0 0 0 0 ")). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( Locale . getDefault (). isValid Postal Code ( context , Ġ" 0 0 0 0 0 - 1 2 3 4 ")). isTrue () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( Locale . getDefault (). isValid Postal Code ( context , Ġ" 0 0 0 0 0 - 1 2 3 4 5 ")). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" k 1 a 0 b 1 ", ĠLocale . CAN ADA )). isTrue () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" k 1 a Ġ 0 b 1 ", ĠLocale . CAN ADA )). isTrue () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" k 1 a - 0 b 1 ", ĠLocale . CAN ADA )). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 0 0 0 0 0 0 ", ĠLocale . CAN ADA )). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 0 0 0 Ġ 0 0 0 ", ĠLocale . CAN ADA )). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code ("", ĠLocale . CAN ADA )). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 0 0 0 0 0 ", ĠLocale . CAN ADA )). isFalse () ĊĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 2 3 6 ", ĠLocale . TA IW AN )). isTrue () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 2 3 6 6 9 ", ĠLocale . TA IW AN )). isTrue () ĊĠĠĠĠĠĠĠ Ġ// Ġnot Ġsupported Ġ 3 + 3 ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 2 3 6 0 3 4 ", ĠLocale . TA IW AN )). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 2 3 6 - 6 9 ", ĠLocale . TA IW AN )). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code (" 2 3 6 - 0 3 4 ", ĠLocale . TA IW AN )). isFalse () ĊĠĠĠĠĠĠĠ ĠTr uth . assertThat ( context . isValid Postal Code ("", ĠLocale . TA IW AN )). isFalse () ĊĠĠĠ Ġ} Ċ }