Philzen ec8998b39f
[test-stack] Implement inner class assertion and fix typo "doesNotContains" (#18921)
* Implement InnerClassAssert for easy inner class testing

* Suppress "'Optional.get()' without 'isPresent()' check" warning

For now, until https://youtrack.jetbrains.com/issue/IDEA-354935
is solved.

* Apply DRY refactoring

* Move newTempFolder helper method into TestUtils

* Fix typo `doesNotContains`

* Pluralize assertion classes that extend ListAssert

* Add short-hand has/doesNotHaveAnnotation methods to Method assertions

So .hasAssertion(String) can replace .assertMethodAnnotations().containsWithName(String)

* Refactor tests, simplifying setup using CodegenConfigurator

* Harmonize API, removing confusion between has… and assert…

This makes our the assertion API more consistent, in the way that
assertSomething("") will always return a different assertion type,
while hasSomething("") will always return the same type.

* Use simplified hasAnnotation/doesNotHaveAnnotation assertions
2024-06-16 10:03:11 +08:00
..