BeforeEach class final

Marks a method that runs before every test, after the @Autowired() fields were set, so it can prepare beans (empty a store, add test data).

In a Nested class it runs after the outer class's methods. A returned Future is awaited.

@BeforeEach()
void clear() => orders.clear(); // each test starts without orders

Spring (Java): JUnit's @BeforeEach.

Constructors

BeforeEach()
Marks the method.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited