Details

    • Type: Task
    • Status: Closed (View workflow)
    • Priority: unspecified
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: platform-4.6.0
    • Component/s: None
    • Labels:
      None
    • Tested Version/s:
      None
    • Sprint:

      Description

      We have a lot of AssertJ assertions to which we have attempted to give readable names, but we actually have the method calls in the wrong order.

      The .as(description) call must appear before the actual assertion check, like this:

      assertThat(foo).as("standard placeholder name").isEqualTo(COMMON_METASYNTACTIC_VARIABLE)
      

      not like this:

      assertThat(foo).isEqualTo(COMMON_METASYNTACTIC_VARIABLE).as("standard placeholder name")
      

      (IntelliJ actually marks the as call as suspicious, because its result is never used.)

      This regex search via ripgrep should show the vast majority of them (with very few false positives):

      rg '\.as\([^)]*\);'
      

      After those are cleaned up, it might be worth glancing at the results for this too (in case some of the descriptions include parens):

      rg '\.as\(.*\);'
      

        Attachments

          Activity

            People

            • Assignee:
              djansen Damian Jansen
              Reporter:
              sflanigan Sean Flanigan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: