/* Ċ Ġ* ĠCopyright Ġ( c ) Ġ 2 0 1 9 ĠR az ew are ĠLLC Ċ Ġ* Ċ Ġ* ĠPermission Ġis Ġhereby Ġgranted , Ġfree Ġof Ġcharge , Ġto Ġany Ġperson Ġobtaining Ġa Ġcopy Ċ Ġ* Ġof Ġthis Ġsoftware Ġand Ġassociated Ġdocumentation Ġfiles Ġ( the Ġ" Software "), Ġto Ġdeal Ċ Ġ* Ġin Ġthe ĠSoftware Ġwithout Ġrestriction , Ġincluding Ġwithout Ġlimitation Ġthe Ġrights Ċ Ġ* Ġto Ġuse , Ġcopy , Ġmodify , Ġmerge , Ġpublish , Ġdistribute , Ġsublicense , Ġand / or Ġsell Ċ Ġ* Ġcopies Ġof Ġthe ĠSoftware , Ġand Ġto Ġpermit Ġpersons Ġto Ġwhom Ġthe ĠSoftware Ġis Ċ Ġ* Ġfurnished Ġto Ġdo Ġso , Ġsubject Ġto Ġthe Ġfollowing Ġconditions : Ċ Ġ* Ċ Ġ* ĠThe Ġabove Ġcopyright Ġnotice Ġand Ġthis Ġpermission Ġnotice Ġshall Ġbe Ġincluded Ġin Ċ Ġ* Ġall Ġcopies Ġor Ġsubstantial Ġportions Ġof Ġthe ĠSoftware . Ċ Ġ* Ċ Ġ* ĠNot with standing Ġthe Ġfore going , Ġyou Ġmay Ġnot Ġuse , Ġcopy , Ġmodify , Ġmerge , Ġpublish , Ċ Ġ* Ġdistribute , Ġsublicense , Ġcreate Ġa Ġderivative Ġwork , Ġand / or Ġsell Ġcopies Ġof Ġthe Ċ Ġ* ĠSoftware Ġin Ġany Ġwork Ġthat Ġis Ġdesigned , Ġintended , Ġor Ġmarket ed Ġfor Ġped ag og ical Ġor Ċ Ġ* Ġinstruction al Ġpurposes Ġrelated Ġto Ġprogramming , Ġcoding , Ġapplication Ġdevelopment , Ċ Ġ* Ġor Ġinformation Ġtechnology . Ġ ĠPermission Ġfor Ġsuch Ġuse , Ġcopying , Ġmodification , Ċ Ġ* Ġmer ger , Ġpublication , Ġdistribution , Ġsublic ensing , Ġcreation Ġof Ġderivative Ġworks , Ċ Ġ* Ġor Ġsale Ġis Ġexpress ly Ġwith held . Ċ Ġ* Ċ Ġ* ĠTHE ĠSOFTWARE ĠIS ĠPROVIDED Ġ" AS ĠIS ", ĠWITHOUT ĠWARRANTY ĠOF ĠANY ĠKIND , ĠEXPRESS ĠOR Ċ Ġ* ĠIMPLIED , ĠINCLUDING ĠBUT ĠNOT ĠLIMITED ĠTO ĠTHE ĠWARRANTIES ĠOF ĠMERCHANTABILITY , Ċ Ġ* ĠFITNESS ĠFOR ĠA ĠPARTICULAR ĠPURPOSE ĠAND ĠNONINFRINGEMENT . ĠIN ĠNO ĠEVENT ĠSHALL ĠTHE Ċ Ġ* ĠAUTHORS ĠOR ĠCOPYRIGHT ĠHOLDERS ĠBE ĠLIABLE ĠFOR ĠANY ĠCLAIM , ĠDAMAGES ĠOR ĠOTHER Ċ Ġ* ĠLIABILITY , ĠWHETHER ĠIN ĠAN ĠACTION ĠOF ĠCONTRACT , ĠTORT ĠOR ĠOTHERWISE , ĠARISING ĠFROM , Ċ Ġ* ĠOUT ĠOF ĠOR ĠIN ĠCONNECTION ĠWITH ĠTHE ĠSOFTWARE ĠOR ĠTHE ĠUSE ĠOR ĠOTHER ĠDEALINGS ĠIN Ċ Ġ* ĠTHE ĠSOFTWARE . Ċ Ġ*/ Ċ package Ġcom . ray w ender lich . coding comp anion finder Ċ Ċ import Ġandroid . os . Build Ċ import Ġandroidx . fragment . app . testing . launch Fragment In Container Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . assertion . View Assertions . matches Ċ import Ġandroidx . test . espress o . matcher . View Matchers . is Displayed Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Text Ċ import Ġandroidx . test . ext . junit . runners . Android JUnit 4 Ċ import Ġcom . ray w ender lich . coding comp anion finder . models . Address Ċ import Ġcom . ray w ender lich . coding comp anion finder . models . Animal Ċ import Ġcom . ray w ender lich . coding comp anion finder . models . B reed s Ċ import Ġcom . ray w ender lich . coding comp anion finder . models . Contact Ċ import Ġcom . ray w ender lich . coding comp anion finder . search for comp anion . View Companion Fragment Ċ import Ġcom . ray w ender lich . coding comp anion finder . search for comp anion . View Companion Fragment Args Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . annotation . Config Ċ import Ġorg . ro bo lectric . annotation . Looper Mode Ċ Ċ @ RunWith ( Android JUnit 4 :: class ) Ċ @ Looper Mode ( Looper Mode . Mode . PA USED ) Ċ @ Config ( sdk Ġ= Ġ[ Build . VERSION _ CODES . O _ MR 1 ]) Ċ class ĠView Companion Test Ġ{ ĊĠ Ġ@ Before ĊĠ Ġfun Ġbefore Tests Run () Ġ{ Ċ // Ġ 1 ĊĠĠĠ Ġval Ġanimal Ġ= ĠAnimal ( ĊĠĠĠĠĠĠ 2 2 , ĊĠĠĠĠĠ ĠContact ( ĊĠĠĠĠĠĠĠ Ġphone Ġ= Ġ" 4 0 4 - 8 6 7 - 5 3 0 9 ", ĊĠĠĠĠĠĠĠ Ġemail Ġ= Ġ" coding . comp anion @ raz ware . com ", ĊĠĠĠĠĠĠĠ Ġaddress Ġ= ĠAddress ( ĊĠĠĠĠĠĠĠĠĠ Ġ"", ĊĠĠĠĠĠĠĠĠĠ Ġ"", ĊĠĠĠĠĠĠĠĠĠ Ġ" At l anta ", ĊĠĠĠĠĠĠĠĠĠ Ġ" GA ", ĊĠĠĠĠĠĠĠĠĠ Ġ" 3 0 3 0 3 ", ĊĠĠĠĠĠĠĠĠĠ Ġ" USA " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġ" 5 ", ĊĠĠĠĠĠ Ġ" small ", ĊĠĠĠĠĠ Ġarray ListOf (), ĊĠĠĠĠĠ ĠB reed s (" sh ih Ġt zu ", Ġ"", Ġfalse , Ġfalse ), ĊĠĠĠĠĠ Ġ" Spi ke ", ĊĠĠĠĠĠ Ġ" male ", ĊĠĠĠĠĠ Ġ" A Ġsweet Ġlittle Ġgu y Ġwith Ġspi key Ġtee th !" ĊĠĠĠ Ġ) Ċ // Ġ 2 ĊĠĠĠ Ġval Ġbundle Ġ= ĠView Companion Fragment Args ( animal ). to Bundle () Ċ // Ġ 3 ĊĠĠĠ Ġlaunch Fragment In Container < View Companion Fragment >( ĊĠĠĠĠĠ Ġbundle , ĊĠĠĠĠĠ ĠR . style . App Theme ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcheck _ that _ all _ values _ display _ correct ly () Ġ{ ĊĠĠĠ Ġon View ( with Text (" Spi ke ")). check ( matches ( is Displayed ())) ĊĠĠĠ Ġon View ( with Text (" At l anta , ĠGA ")). check ( matches ( is Displayed ())) ĊĠĠĠ Ġon View ( with Text (" sh ih Ġt zu ")). check ( matches ( is Displayed ())) ĊĠĠĠ Ġon View ( with Text (" 5 ")). check ( matches ( is Displayed ())) ĊĠĠĠ Ġon View ( with Text (" male ")). check ( matches ( is Displayed ())) ĊĠĠĠ Ġon View ( with Text (" small ")). check ( matches ( is Displayed ())) ĊĠĠĠ Ġon View ( with Text (" A Ġsweet Ġlittle Ġgu y Ġwith Ġspi key Ġtee th ! ")). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text (" 4 0 4 - 8 6 7 - 5 3 0 9 ")). check ( matches ( is Displayed ())) ĊĠĠĠĠĠĠĠ Ġon View ( with Text (" coding . comp anion @ raz ware . com ")). check ( matches ( is Displayed ())) ĊĠ Ġ} Ċ } Ċ