Skip to content

Instantly share code, notes, and snippets.

@mbrookson
Last active November 18, 2020 10:03
Show Gist options
  • Save mbrookson/e28cd8e0931bb9db0a36a45aa9b6ebc7 to your computer and use it in GitHub Desktop.
Save mbrookson/e28cd8e0931bb9db0a36a45aa9b6ebc7 to your computer and use it in GitHub Desktop.
TestInitialize to constructor
# Remove [TestInitialize] attribute and replace Initialise method name with class name for constructor
(public\sclass\s(\w*).*((\r\n|\r|\n).*)*)\[TestInitialize\]\n.*(public\s)void\s(\w*)
(public\sclass\s(\w*).*((\r\n|\r|\n).*)*)\[TestInitialize\]\n.*(public\s)async\sTask\s(\w*)
# Replace substitutions
$1$5$2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment