Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^assertEquals\(\s*(?<one>[^,]+)\s*,\s*(?<two>[^,]+)\s*,\s*(?<three>[^,;]+)\s*\);$
/
mg

Description

Converts assertEquals("message", expected, actual) to AssertJ syntax

Replacement: assertThat(${three}).isEqualTo(${two}).as(${one});

Submitted by anonymous - 8 years ago