Skip to content

Commit

Permalink
feat(volodya-lombrozo#248): method source
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Oct 11, 2024
1 parent 681ea2e commit 0444412
Showing 1 changed file with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.hamcrest.MatcherAssert;
import org.hamcrest.core.IsEqual;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

/**
* Tests for {@link PresentTenseForPlural}.
Expand All @@ -36,9 +38,9 @@
*/
final class PresentTenseForPluralTest {

@Test
void passesOnPresentTenseWithPresentVerb() throws Exception {
final List<Tag> tags = new ListOf<>(Tag.PRP, Tag.PRP, Tag.VBP);
@MethodSource("presentTenseWithPlural")
@ParameterizedTest
void passesOnPresentTenseForPlural(final List<Tag> tags) throws Exception {
MatcherAssert.assertThat(
String.format(
"Tags: %s should form present tense for plural",
Expand All @@ -49,16 +51,12 @@ void passesOnPresentTenseWithPresentVerb() throws Exception {
);
}

@Test
void passesOnPresentTenseWithBaseVerb() throws Exception {
final List<Tag> tags = new ListOf<>(Tag.PRP, Tag.PRP, Tag.VB);
MatcherAssert.assertThat(
String.format(
"Tags '%s' should form present tense for plural",
tags
),
new PresentTenseForPlural(tags).value(),
new IsEqual<>(true)
private static List<List<Tag>> presentTenseWithPlural() {
return new ListOf<>(
new ListOf<>(Tag.PRP, Tag.PRP, Tag.VBP),
new ListOf<>(Tag.PRP, Tag.PRP, Tag.VB),
new ListOf<>(Tag.PRP, Tag.NNS, Tag.VBP),
new ListOf<>(Tag.PRP, Tag.NNS, Tag.VB)
);
}
}

0 comments on commit 0444412

Please sign in to comment.