package Ġnl . kel pin . f le ur . ad vent 2 0 1 8 Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . Tag Ċ Ċ class ĠDay 1 2 Test Ġ{ ĊĠĠĠ Ġval Ġsample Ġ= ĠDay 1 2 . of ( resource As List (" day 1 2 - sample . txt ")) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġof () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( sample . initialState ). isEqualTo ( Day 1 2 . State ("# .. # .# .. ## ...... ### ... ### ", Ġ 0 )) ĊĠĠĠĠĠĠĠ ĠassertThat ( sample . rules . size ). isEqualTo ( 1 4 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( sample . rules . toList (). contains (". #### " Ġto Ġ'# ')) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Part Ġ 1 Ġsample `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( sample . part 1 ()). isEqualTo ( 3 2 5 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Tag (" Solution ") ĊĠĠĠ Ġfun Ġ` Part Ġ 1 ĠSolution `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( Day 1 2 . of ( resource As List (" day 1 2 . txt ")). part 1 ()). isEqualTo ( 3 2 5 8 ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Tag (" Solution ") ĊĠĠĠ Ġfun Ġ` Part Ġ 2 ĠSolution `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( Day 1 2 . of ( resource As List (" day 1 2 . txt ")). part 2 ()). isEqualTo ( 3 6 0 0 0 0 0 0 0 2 0 2 2 L ) ĊĠĠĠ Ġ} Ċ }