26 lines
1.1 KiB
Plaintext
26 lines
1.1 KiB
Plaintext
Captured from a real `junit-platform-console-standalone --details=tree` run against
|
|
EnumSourceTest, compiled and executed for real.
|
|
|
|
╷
|
|
├─ JUnit Platform Suite ✔
|
|
├─ JUnit Jupiter ✔
|
|
│ └─ EnumSourceTest ✔
|
|
│ ├─ nonPrivilegedRolesMustNotWrite(Role) ✔
|
|
│ │ ├─ EDITOR must NOT have write access ✔
|
|
│ │ ├─ USER must NOT have write access ✔
|
|
│ │ └─ GUEST must NOT have write access ✔
|
|
│ └─ privilegedRolesShouldHaveWriteAccess(Role) ✔
|
|
│ ├─ ADMIN should have write access ✔
|
|
│ └─ SUPERUSER should have write access ✔
|
|
└─ JUnit Vintage ✔
|
|
|
|
Test run finished after 212 ms
|
|
[ 5 tests successful ]
|
|
[ 0 tests failed ]
|
|
|
|
Two @EnumSource tests over the same Role enum, using the two opposite selection modes:
|
|
privilegedRolesShouldHaveWriteAccess uses mode = INCLUDE with names = {"ADMIN", "SUPERUSER"},
|
|
and nonPrivilegedRolesMustNotWrite uses mode = EXCLUDE with the same two names -- so between
|
|
them every one of the five Role constants is exercised exactly once, and AuthService.canWrite's
|
|
real logic is what each assertion checks against.
|