package Ġnet . dont dr ink and root . wicket . bootstrap . behavior Ċ Ċ import Ġnet . dont dr ink and root . wicket . bootstrap . test . Abstract W icket Test Ċ import Ġorg . apache . wicket . core . util . string . Component Renderer Ċ import Ġorg . apache . wicket . markup . html . Web Markup Container Ċ import Ġorg . apache . wicket . util . tester . Tag Tester Ċ import Ġorg . junit . jupiter . api . Assertions Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ class ĠButton Behavior Test Ġ: ĠAbstract W icket Test () Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Default Markup () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbutton Container Ġ= ĠWeb Markup Container (" id ") ĊĠĠĠĠĠĠĠ Ġbutton Container . add ( Button Behavior ()) ĊĠĠĠĠĠĠĠ Ġval Ġcomponent Markup Ġ= ĠComponent Renderer . render Component ( button Container ) ĊĠĠĠĠĠĠĠ Ġval Ġtag Tester Ġ= ĠTag Tester . create Tag By Attribute ( component Markup . toString (), Ġ" wicket : id ", Ġ" id ") ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( tag Tester . getAttribute Contains (" class ", Ġ" btn ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( tag Tester . getAttribute Contains (" class ", Ġ" btn - secondary ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertFalse ( tag Tester . getAttribute Contains (" class ", Ġ" disabled ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Disabled Markup () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbutton Container Ġ= ĠWeb Markup Container (" id ") ĊĠĠĠĠĠĠĠ Ġbutton Container . isEnabled Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġbutton Container . add ( Button Behavior ()) ĊĠĠĠĠĠĠĠ Ġval Ġcomponent Markup Ġ= ĠComponent Renderer . render Component ( button Container ) ĊĠĠĠĠĠĠĠ Ġval Ġtag Tester Ġ= ĠTag Tester . create Tag By Attribute ( component Markup . toString (), Ġ" wicket : id ", Ġ" id ") ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( tag Tester . getAttribute Contains (" class ", Ġ" btn ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( tag Tester . getAttribute Contains (" class ", Ġ" btn - secondary ")) ĊĠĠĠĠĠĠĠ ĠAssertions . assertTrue ( tag Tester . getAttribute Contains (" class ", Ġ" disabled ")) ĊĠĠĠ Ġ} Ċ }