private void FailAction(string message) { // Log error _testLogger.WriteError(message); // throw error for xUnit throw new InvalidOperationException(message); }