org.junit.jupiter.params.aggregator.AggregateWith Java Examples
The following examples show how to use
org.junit.jupiter.params.aggregator.AggregateWith.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RemoteActionCodeTest.java From triplea with GNU General Public License v3.0 | 7 votes |
@ParameterizedTest @CsvFileSource(resources = "/required-op-codes.csv") void verifyCorrectOpCode( final int opCode, @AggregateWith(MethodAggregator.class) final Method method) { final RemoteActionCode remoteActionCode = method.getAnnotation(RemoteActionCode.class); assertThat( "Expected @RemoteActionCode annotation to be present for " + method, remoteActionCode, is(notNullValue())); assertThat("Invalid value for " + method, remoteActionCode.value(), is(opCode)); }
Example #2
Source File: PersonUnitTest.java From tutorials with MIT License | 5 votes |
@ParameterizedTest @CsvSource({"Isaac Newton,Isaac,,Newton", "Charles Robert Darwin,Charles,Robert,Darwin"}) void fullName_ShouldGenerateTheExpectedFullName(String expectedFullName, @AggregateWith(PersonAggregator.class) Person person) { assertEquals(expectedFullName, person.fullName()); }