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

Introduce @SentenceFragment for IndicativeSentences DisplayNameGenerator #4349

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbrannen
Copy link
Member

@sbrannen sbrannen commented Feb 26, 2025

Overview

This PR currently serves as a proof of concept for introducing @⁠SentenceFragment for the IndicativeSentences DisplayNameGenerator.

Related Issues

Definition of Done

@sbrannen
Copy link
Member Author

With the status quo of this PR, the following test class...

class DisplayNameGeneratorDemo {

	@Nested
	@IndicativeSentencesGeneration
	@SentenceFragment("A year is a leap year")
	class LeapYearTests {

		@Nested
		@SentenceFragment("(nested)")
		class NestedTests {

			@ParameterizedTest(name = "{0}")
			@ValueSource(ints = { 2016, 2020, 2048 })
			@SentenceFragment("if it is one of the following years")
			void validLeapYear(int year) {
			}
		}
	}
}

Results in a test tree like:

Screenshot 2025-02-26 at 16 57 07

@sbrannen sbrannen force-pushed the issues/4347-sentence-fragment-annotation branch 3 times, most recently from 7f4b508 to 2bc268d Compare February 27, 2025 11:27
@sbrannen sbrannen force-pushed the issues/4347-sentence-fragment-annotation branch from 2bc268d to bb86a1d Compare February 27, 2025 11:51
@sbrannen sbrannen marked this pull request as ready for review February 27, 2025 12:58
@sbrannen
Copy link
Member Author

The concept, implementation, and Javadoc are ready for review.

Automated tests and documentation in the User Guide and Release Notes will follow, pending approval of the concept/implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce @SentenceFragment for use with IndicativeSentences DisplayNameGenerator
1 participant