appendName

Appends a formatted name to a StringBuilder if the name is not blank.

This utility function formats the name by wrapping it in parentheses and appends it to the provided StringBuilder, useful for building descriptive test names or labels.

Parameters

name

The name to append. If blank, nothing is appended.