Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typos #692

Merged
merged 1 commit into from Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/feature_request.md
Expand Up @@ -21,12 +21,12 @@ For example:
- I tried to use extension Y to do X, but with the current implementation I can only do Z
- I read about this fancy thing, Gradle can do now!

**Please describe, what you would like to be changed / added / improved. If you want to add code or pseudo-code snippets, feel free to do so. If you have knowledge about possible side effects or problems or have considered any alternative solutions, please add information about them, too**
**Please describe, what you would like to be changed / added / improved. If you want to add code or pseudocode snippets, feel free to do so. If you have knowledge about possible side effects or problems or have considered any alternative solutions, please add information about them, too**

Example:
- I would like to see the possibility to use a new annotation, maybe `@Fancy("value")` to do X
- I suggest to update to Java 2042 to use the new feature Z, but this also means, that the Gradle version has to be updated, and it's only a release candidate (RC) so far

**Additional context**

Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -573,7 +573,7 @@ JUnit Pioneer uses semantic versioning, i.e. _major.minor.patch_ as follows:
* _patch_: resets to 0 when _minor_ changes and increases otherwise

The Javadoc `@since` tag can guide whether a change is non-trivial.
If such a tag was added, _minor_ must increased - if not, it's up for debate (which is best held in a high-fidelity tool like Discord or Twitch chat).
If such a tag was added, _minor_ must be increased - if not, it's up for debate (which is best held in a high-fidelity tool like Discord or Twitch chat).

For contributors that means that when they add members that require such a tag, they should generally put the next _minor_ version next to it.

Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -123,6 +123,7 @@ The least we can do is to thank them and list some of their accomplishments here
* [Mathieu Fortin](https://github.com/mathieufortin01) contributed the `suspendForMs` attribute in [retrying tests](https://junit-pioneer.org/docs/retrying-test/) (#407 / #604)
* [Pankaj Kumar](https://github.com/p1729) contributed towards improving GitHub actions (#587 / #611)
* [Rob Spoor](https://github.com/robtimus) enabled non-static factory methods for `@CartesianTest.MethodFactory` (#628)
* [Marc Wrobel](https://github.com/marcwrobel) improved the documentation (#692)

#### 2021

Expand Down
Expand Up @@ -22,27 +22,27 @@ public class DefaultLocaleTimezoneExtensionDemo {
// tag::default_locale_language[]
@Test
@DefaultLocale("zh-Hant-TW")
void test_with_lanuage() {
void test_with_language() {
assertThat(Locale.getDefault()).isEqualTo(Locale.forLanguageTag("zh-Hant-TW"));
}
// end::default_locale_language[]

// tag::default_locale_language_alternatives[]
@Test
@DefaultLocale(language = "en")
void test_with_lanuage_only() {
void test_with_language_only() {
assertThat(Locale.getDefault()).isEqualTo(new Locale("en"));
}

@Test
@DefaultLocale(language = "en", country = "EN")
void test_with_lanuage_and_country() {
void test_with_language_and_country() {
assertThat(Locale.getDefault()).isEqualTo(new Locale("en", "EN"));
}

@Test
@DefaultLocale(language = "en", country = "EN", variant = "gb")
void test_with_lanuage_and_country_and_vairant() {
void test_with_language_and_country_and_variant() {
assertThat(Locale.getDefault()).isEqualTo(new Locale("en", "EN", "gb"));
}
// end::default_locale_language_alternatives[]
Expand Down
Expand Up @@ -30,7 +30,7 @@ void validDigit(int digit) {
@DoubleRangeSource(from = -0.1, to = -10, step = -0.1)
void howColdIsIt(double d) {
System.out.println(d + " °C is cold");
System.out.println(d + " °F is REALY cold");
System.out.println(d + " °F is REALLY cold");
System.out.println(d + " K is too cold to be true");
}
// end::rangesources_double_with_step[]
Expand Down
Expand Up @@ -199,8 +199,8 @@ private Class<?> getExplicitOrImplicitClass(Method testMethod, String factoryMet
private CartesianProductTest.Sets invokeSetsFactory(Method testMethod, Method factory) {
CartesianProductTest.Sets sets = (CartesianProductTest.Sets) invokeMethod(factory, null);
if (sets.getSets().size() > testMethod.getParameterCount()) {
// If sets == parameters but one of the parameters should be auto-injected by JUnit
// JUnit will throw a ParameterResolutionException for competing resolvers before we could get to this line
// If sets == parameters but one of the parameters should be auto-injected by JUnit.
// JUnit will throw a ParameterResolutionException for competing resolvers before we could get to this line.
throw new ParameterResolutionException(format(
"Method `%s` must register values for each parameter exactly once. Expected [%d] parameter sets, but got [%d].",
factory, testMethod.getParameterCount(), sets.getSets().size()));
Expand Down
Expand Up @@ -21,7 +21,7 @@

/**
* {@code @ClearEnvironmentVariable} is a JUnit Jupiter extension to clear the value
* of a environment variable for a test execution.
* of an environment variable for a test execution.
*
* <p>The key of the environment variable to be cleared must be specified via {@link #key()}.
* After the annotated element has been executed, the original value or the value of the
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/junitpioneer/jupiter/DefaultLocale.java
Expand Up @@ -68,7 +68,7 @@
public @interface DefaultLocale {

/**
* An language tag string as specified by IETF BCP 47. See
* A language tag string as specified by IETF BCP 47. See
* {@link java.util.Locale#forLanguageTag(String)} for more information
* about valid language tag values.
*
Expand Down
Expand Up @@ -20,8 +20,8 @@
import org.junit.jupiter.api.extension.ExtendWith;

/**
* {@code @SetEnvironmentVariable} is a JUnit Jupiter extension to set the value of a
* environment variable for a test execution.
* {@code @SetEnvironmentVariable} is a JUnit Jupiter extension to set the value of
* an environment variable for a test execution.
*
* <p>The key and value of the environment variable to be set must be specified via
* {@link #key()} and {@link #value()}. After the annotated method has been executed,
Expand Down
Expand Up @@ -94,8 +94,8 @@ private ArgumentSets invokeMethodFactory(Method testMethod, Method factory, Obje
ArgumentSets argumentSets = (ArgumentSets) invokeMethod(factory, target);
long count = argumentSets.getArguments().size();
if (count > testMethod.getParameterCount()) {
// If arguments count == parameters but one of the parameters should be auto-injected by JUnit
// JUnit will throw a ParameterResolutionException for competing resolvers before we could get to this line
// If arguments count == parameters but one of the parameters should be auto-injected by JUnit.
// JUnit will throw a ParameterResolutionException for competing resolvers before we could get to this line.
throw new ParameterResolutionException(format(
"Method `%s` must register values for each parameter exactly once. Expected [%d] parameter sets, but got [%d].",
factory, testMethod.getParameterCount(), count));
Expand Down
Expand Up @@ -45,7 +45,7 @@

/**
* Disable test cases if all arguments (converted to String with {@link Object#toString()})
* contain any of the the specified strings (according to {@link String#contains(CharSequence)}).
* contain any of the specified strings (according to {@link String#contains(CharSequence)}).
*/
String[] contains() default {};

Expand Down
Expand Up @@ -45,7 +45,7 @@

/**
* Disable test cases if any argument (converted to String with {@link Object#toString()})
* contains any of the the specified strings (according to {@link String#contains(CharSequence)}).
* contains any of the specified strings (according to {@link String#contains(CharSequence)}).
*/
String[] contains() default {};

Expand Down
Expand Up @@ -63,7 +63,7 @@

/**
* Disable test cases whose argument (converted to String with {@link Object#toString()})
* contains any of the the specified strings (according to {@link String#contains(CharSequence)}).
* contains any of the specified strings (according to {@link String#contains(CharSequence)}).
*/
String[] contains() default {};

Expand Down
Expand Up @@ -113,7 +113,7 @@ void validInput() {

@Nested
@DisplayName("not empty with message")
class NotEmptyWithMessgeTests {
class NotEmptyWithMessageTests {

@Test
@DisplayName("should throw violation exception if collection is null")
Expand Down
Expand Up @@ -90,8 +90,8 @@ void worksWithNull() {
}

@Test
@DisplayName("when factory is non-static with lifecyle PER_CLASS")
void nonStaticWithLifecylePerClass() {
@DisplayName("when factory is non-static with lifecycle PER_CLASS")
void nonStaticWithLifecyclePerClass() {
ExecutionResults results = PioneerTestKit
.executeNestedTestMethodWithParameterTypes(List.of(CorrectFactoryTestCases.class),
CorrectFactoryTestCases.PerClassLifecycle.class, "nonStatic", String.class, String.class);
Expand Down Expand Up @@ -199,8 +199,8 @@ void noNullToPrimitive() {
}

@Test
@DisplayName("finds very explicitly specified class and non-static method with lifecyle PER_CLASS")
void findNonStaticExactWithLifecylePerClass() {
@DisplayName("finds very explicitly specified class and non-static method with lifecycle PER_CLASS")
void findNonStaticExactWithLifecyclePerClass() {
ExecutionResults results = PioneerTestKit
.executeNestedTestMethodWithParameterTypes(List.of(WrongFactoryTestCases.class),
WrongFactoryTestCases.PerClassLifecycle.class, "findsNonStaticExact", String.class,
Expand Down