package Ġorg . cr u . god tools . tool . model Ċ Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . test . run Test Ċ import Ġorg . cr u . god tools . tool . Parser Config Ċ import Ġorg . cr u . god tools . tool . internal . Android JUnit 4 Ċ import Ġorg . cr u . god tools . tool . internal . Run On Android With Ċ import Ġorg . cr u . god tools . tool . internal . Uses Resources Ċ import Ġorg . cr u . god tools . tool . model . tips . Inline Tip Ċ import Ġorg . cr u . god tools . tool . model . tips . Tip Ċ import Ġkotlin . test . Before Test Ċ import Ġkotlin . test . Test Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assertIs Ċ Ċ @ Run On Android With ( Android JUnit 4 :: class ) Ċ @ Opt In ( Experimental Cor outines Api :: class ) Ċ class ĠParagraph Test Ġ: ĠUses Resources () Ġ{ ĊĠĠĠ Ġ@ Before Test ĊĠĠĠ Ġfun Ġsetup Config () Ġ{ ĊĠĠĠĠĠĠĠ ĠParser Config . supported Device Types Ġ= Ġset Of ( DeviceType . ANDROID , ĠDevice Type . MOB ILE ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Parse Paragraph () Ġ= Ġrun Test Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġparagraph Ġ= ĠParagraph ( Manifest (), Ġget Test Xml Parser (" paragraph . xml ")) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 2 , Ġparagraph . content . size ) ĊĠĠĠĠĠĠĠ Ġassert Is < Image >( paragraph . content [ 0 ]) ĊĠĠĠĠĠĠĠ Ġassert Is < Text >( paragraph . content [ 1 ]) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Parse Paragraph Ignored Content () Ġ= Ġrun Test Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġparagraph Ġ= ĠParagraph ( Manifest (), Ġget Test Xml Parser (" paragraph _ ignored _ content . xml ")) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 3 , Ġparagraph . content . size ) ĊĠĠĠĠĠĠĠ ĠassertEquals (" Test ", Ġassert Is < Text >( paragraph . content [ 0 ]). text ) ĊĠĠĠĠĠĠĠ ĠassertEquals (" Android ", Ġassert Is < Text >( paragraph . content [ 1 ]). text ) ĊĠĠĠĠĠĠĠ ĠassertEquals (" Mobile ", Ġassert Is < Text >( paragraph . content [ 2 ]). text ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Tips Property () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmanifest Ġ= ĠManifest ( tips Ġ= Ġ{ ĠlistOf ( Tip ( it , Ġ" tip 2 "), ĠTip ( it , Ġ" tip 1 ")) Ġ}) ĊĠĠĠĠĠĠĠ Ġval Ġparagraph Ġ= ĠParagraph ( manifest ) Ġ{ ĠlistOf ( Inline Tip ( it , Ġ" tip 1 "), ĠInline Tip ( it , Ġ" tip 2 ")) Ġ} ĊĠĠĠĠĠĠĠ ĠassertEquals ( listOf ( manifest . find Tip (" tip 1 ") !! , Ġmanifest . find Tip (" tip 2 ") !! ), Ġparagraph . tips ) ĊĠĠĠ Ġ} Ċ } Ċ