Simplify each BasicTests test.

This extracts the common part of each method into the class constructor and Dispose methods.

It looks like the github-generated diff is pretty misleading. I didn't change test methods from void to async Task or vice versa. I merely extracted the common code from each method as the commit comment claims.