Skip to content

Instantly share code, notes, and snippets.

@wlee221
Created November 2, 2023 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wlee221/e890e85d2342ae7b48a6bdf4b64c4c92 to your computer and use it in GitHub Desktop.
Save wlee221/e890e85d2342ae7b48a6bdf4b64c4c92 to your computer and use it in GitHub Desktop.
@nested example
class TestableClass {
public foo() { /* do something */ }
public bar() { /* do something */ }
}
class TestableClassTest {
// test suite for Foo
@Nested
class Foo {
@Test
void shouldDoA() { }
@Test
void shouldDoB() { }
}
// test suite for Bar
@Nested
class Bar{
@Test
void shouldDoA() { }
@Test
void shouldDoB() { }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment