Skip to content

Commit

Permalink
Reused c.p.k.c.Rule.VisitorModifier.RunAfterRule
Browse files Browse the repository at this point in the history
### What's done:
* fixed formatting issue
  • Loading branch information
nulls committed May 27, 2022
1 parent 455e2cc commit cf4c438
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,17 @@ class DiktatRuleSetProviderTest {
}

val orderedRule = DiktatRuleSetProvider.OrderedRule(rule2, rule1)
val visitorModifiers = orderedRule.visitorModifiers
orderedRule.visitorModifiers
.filterIsInstance<Rule.VisitorModifier.RunAfterRule>()
Assertions.assertEquals(1, visitorModifiers.size,
"Found invalid count of Rule.VisitorModifier.RunAfterRule")
Assertions.assertEquals(rule1.id, visitorModifiers[0].ruleId,
"Invalid ruleId in Rule.VisitorModifier.RunAfterRule")
.also {
Assertions.assertEquals(1, it.size,
"Found invalid count of Rule.VisitorModifier.RunAfterRule")
}
.first()
.let {
Assertions.assertEquals(rule1.id, it.ruleId,
"Invalid ruleId in Rule.VisitorModifier.RunAfterRule")
}
}

companion object {
Expand Down

0 comments on commit cf4c438

Please sign in to comment.