Can @Nested class be non-static? #4613
-
Testcontainers hava a case with public class LocalstackContainerTest {
public static class WithoutNetwork {
// without_network {
@ClassRule
public static LocalStackContainer localstack = new LocalStackContainer(LocalstackTestImages.LOCALSTACK_IMAGE)
.withServices(
Service.S3,
Service.SQS,
Service.CLOUDWATCHLOGS,
Service.KMS,
LocalStackContainer.EnabledService.named("events")
); I don't understand the way to rewrite it to JUnit 5 since Of course, I can try making the field non- PS. I think I've created the question, however, it seems to disappear somehow. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
While |
Beta Was this translation helpful? Give feedback.
Allowing
static
@Nested
classes will have implications that might complicate matters. Could you please create an issue?