package Ġio . gitlab . art urb os ch . de te kt . rules . style Ċ Ċ import Ġio . gitlab . art urb os ch . de te kt . rules . Case Ċ import Ġio . gitlab . art urb os ch . de te kt . test . Test Config Ċ import Ġio . gitlab . art urb os ch . de te kt . test . lint Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . jetbrains . spe k . api . dsl . given Ċ import Ġorg . jetbrains . spe k . api . dsl . it Ċ import Ġorg . jetbrains . spe k . subject . Subject Spe k Ċ Ċ class ĠLoop With Too Many Jump Statements Spec Ġ: ĠSubject Spe k < Loop With Too Many Jump Statements >({ Ċ ĉ subject Ġ{ ĠLoop With Too Many Jump Statements () Ġ} ĊĊ ĉ given (" loops Ġwith Ġmultiple Ġbreak Ġor Ġcontinue Ġstatements ") Ġ{ ĊĊĉ ĉ val Ġpath Ġ= ĠCase . Loop With Too Many Jump Statements Positive . path () ĊĊĉ ĉ it (" reports Ġloops Ġwith Ġmore Ġthan Ġ 1 Ġbreak Ġor Ġcontinue Ġstatement ") Ġ{ Ċĉĉ ĉ assertThat ( subject . lint ( path )). has Size ( 3 ) Ċĉ ĉ } ĊĊĉ ĉ it (" does Ġnot Ġreport Ġwhen Ġmax Ġcount Ġconfiguration Ġis Ġset Ġto Ġ 2 ") Ġ{ Ċĉĉ ĉ val Ġconfig Ġ= ĠTest Config ( map Of ( Loop With Too Many Jump Statements . MAX _ JUMP _ COUNT Ġto Ġ" 2 ")) Ċĉĉ ĉ val Ġfindings Ġ= ĠLoop With Too Many Jump Statements ( config ). lint ( path ) Ċĉĉ ĉ assertThat ( find ings ). has Size ( 0 ) Ċĉ ĉ } ĊĊĉ ĉ it (" does Ġnot Ġreport Ġloop Ġwith Ġless Ġthan Ġ 1 Ġbreak Ġor Ġcontinue Ġstatement ") Ġ{ Ċĉĉ ĉ val Ġfindings Ġ= Ġsubject . lint ( Case . Loop With Too Many Jump Statements Negative . path ()) Ċĉĉ ĉ assertThat ( find ings ). has Size ( 0 ) Ċĉ ĉ } Ċ ĉ } Ċ }) Ċ