Skip to content

Commit

Permalink
Add shortcut in TestGenerationContext
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Sep 28, 2022
1 parent 737967f commit c5fc0a5
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,21 @@ public TestGenerationContext(ClassNameGenerator classNameGenerator) {

/**
* Create an instance using the specified {@code target}.
* @param target the default target class to use
* @param target the default target class name to use
*/
public TestGenerationContext(ClassName target) {
this(new ClassNameGenerator(target));
}

/**
* Create an instance using the specified {@code target}.
* @param target the default target class to use
*/
public TestGenerationContext(Class<?> target) {
this(ClassName.get(target));
}


/**
* Create an instance using {@link #TEST_TARGET} as the {@code target}.
*/
Expand Down

0 comments on commit c5fc0a5

Please sign in to comment.