Created
November 2, 2023 06:36
-
-
Save wlee221/e890e85d2342ae7b48a6bdf4b64c4c92 to your computer and use it in GitHub Desktop.
@nested example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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