package Ġcom . j rk . mood 4 food . test Ċ Ċ import Ġcom . j rk . mood 4 food . App Ċ import Ġcom . j rk . mood 4 food . recipes . detail . model . Recipe Entity Ċ import Ġcom . j rk . mood 4 food . recipes . detail . view . Detail Activity Ċ import Ġjunit . framework . Assert . assertEquals Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . BeforeClass Ċ import Ġorg . junit . Test Ċ Ċ class ĠRecipe Local Entity Ġ{ ĊĊĠĠĠ Ġ@ Test Ġfun Ġinit Value Recipe () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmock _ recipe : ĠRecipe Entity Ġ= ĠRecipe Entity ( App . getContext ()) ĊĠĠĠĠĠĠĠ ĠassertEquals ("", Ġmock _ recipe . title ); ĊĠĠĠĠĠĠĠ ĠassertEquals ( 0 , Ġmock _ recipe . ingredients . size ); ĊĠĠĠĠĠĠĠ ĠassertEquals ( 0 , Ġmock _ recipe . materials . size ); ĊĠĠĠĠĠĠĠ ĠassertEquals ("", Ġmock _ recipe . description ); ĊĠĠĠĠĠĠĠ ĠassertEquals ("", Ġmock _ recipe . image Uri ); ĊĠĠĠĠĠĠĠ ĠassertEquals ( false , Ġmock _ recipe . favorite ); ĊĠĠĠĠĠĠĠ ĠassertEquals ("", Ġmock _ recipe . last E aten ); ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġset And Toggle Favorite () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmock _ recipe : ĠRecipe Entity Ġ= ĠRecipe Entity ( App . getContext ()) ĊĠĠĠĠĠĠĠ Ġmock _ recipe . favorite Ġ= Ġtrue ; ĊĠĠĠĠĠĠĠ ĠassertEquals ( true , Ġmock _ recipe . favorite ); ĊĠĠĠĠĠĠĠ Ġmock _ recipe . favorite Ġ= Ġ! mock _ recipe . favorite ĊĠĠĠĠĠĠĠ ĠassertEquals ( false , Ġmock _ recipe . favorite ); ĊĠĠĠĠĠĠĠ Ġmock _ recipe . favorite Ġ= Ġ! mock _ recipe . favorite ĊĠĠĠĠĠĠĠ ĠassertEquals ( true , Ġmock _ recipe . favorite ); ĊĠĠĠĠĠĠĠ Ġmock _ recipe . favorite Ġ= Ġfalse ; ĊĠĠĠĠĠĠĠ ĠassertEquals ( false , Ġmock _ recipe . favorite ); ĊĠĠĠ Ġ} Ċ }