package de.retest.recheck;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.Optional;

import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

@Nested
class TestCaseFinderTest {

	@Nested
	class SomeTest {

		final Optional<String> className = TestCaseFinder.getInstance().findTestCaseClassNameInStack();

		@Test
		void test_case_finder_should_print_class_name_test() throws Exception {
			assertThat( className ).hasValue( getClass().getName() );
		}
	}

	@Nested
	class SomeIT {

		final Optional<String> className = TestCaseFinder.getInstance().findTestCaseClassNameInStack();

		@Test
		void test_case_finder_should_print_class_name_it() throws Exception {
			assertThat( className ).hasValue( getClass().getName() );
		}
	}

	@Nested
	class SomeClass {

		final Optional<String> className = TestCaseFinder.getInstance().findTestCaseClassNameInStack();

		@Test
		void test_case_finder_should_print_class_name() throws Exception {
			assertThat( className ).isEmpty();
		}
	}

}

@@ -789,21 +789,308 @@
 ass Some
-Class
+TestCase %7B%0A%0A%09%09final Optional%3CString%3E className = TestCaseFinder.getInstance().findTestCaseClassNameInStack();%0A%0A%09%09@Test%0A%09%09void test_case_finder_should_print_class_name_testcase() throws Exception %7B%0A%09%09%09assertThat( className ).hasValue( getClass().getName() );%0A%09%09%7D%0A%09%7D%0A%0A%09@Nested%0A%09class SomeITCase
  %7B%0A%0A%09%09fi
@@ -1239,16 +1239,23 @@
 ass_name
+_itcase
 () throw
@@ -1299,16 +1299,885 @@
 e ).
-isEmpty(
+hasValue( getClass().getName() );%0A%09%09%7D%0A%09%7D%0A%0A%09@Nested%0A%09class SomeTests %7B%0A%0A%09%09final Optional%3CString%3E className = TestCaseFinder.getInstance().findTestCaseClassNameInStack();%0A%0A%09%09@Test%0A%09%09void test_case_finder_should_print_class_name_tests() throws Exception %7B%0A%09%09%09assertThat( className ).hasValue( getClass().getName() );%0A%09%09%7D%0A%09%7D%0A%0A%09@Nested%0A%09class TestSome %7B%0A%0A%09%09final Optional%3CString%3E className = TestCaseFinder.getInstance().findTestCaseClassNameInStack();%0A%0A%09%09@Test%0A%09%09void test_case_finder_should_print_class_name_prefix_test() throws Exception %7B%0A%09%09%09assertThat( className ).hasValue( getClass().getName() );%0A%09%09%7D%0A%09%7D%0A%0A%09@Nested%0A%09class ITSome %7B%0A%0A%09%09final Optional%3CString%3E className = TestCaseFinder.getInstance().findTestCaseClassNameInStack();%0A%0A%09%09@Test%0A%09%09void test_case_finder_should_print_class_name_prefix_it() throws Exception %7B%0A%09%09%09assertThat( className ).hasValue( getClass().getName() 
 );%0A%09

Add more tests