Skip to content

Bad filename for tests inherited from abstract class #419

Open
@lmartelli

Description

@lmartelli

If a test class inherits test methods from a base class, the filenames for received/approved documents use the name of the base class.

For instance :

class MyTest {
	class BaseTest {
		@Test
		void sharedTest() {
			Approvals.verify("result");
		}
	}

	@Nested
	class NestedTest extends BaseTest {
	}
}

will generate MyTest.BaseTest.sharedTest.received.txt. It would be better to have MyTest.NestedTest.sharedTest.received.txt to avoid conflicts if when you have multiple tests classes that inherit from BaseTest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions