Skip to content

Instantly share code, notes, and snippets.

@richashworth
Last active June 28, 2020 15:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richashworth/62a558a13631e222e750 to your computer and use it in GitHub Desktop.
Save richashworth/62a558a13631e222e750 to your computer and use it in GitHub Desktop.
Used as Class Under Test in PowerMock Example
package com.richashworth.powermockexample;
import java.util.List;
public class ResultsWriter {
public String getDataAsString(){
StringBuilder builder = new StringBuilder();
List<String> dataList = DataProvider.getData();
for(String str: dataList){
builder.append(str + "\n");
}
return builder.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment