MagicTest class
Test bootstrap helper for Magic framework.
Provides standardized setup/teardown for unit and widget tests.
void main() {
MagicTest.init();
test('my test', () { /* Magic container is clean */ });
}
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
Static Methods
-
boot(
{List< Map< configs = const [], String envFileName = '.env.testing'}) → Future<String, dynamic> >void> - Bootstrap Magic with test configuration.
-
init(
) → void - Initialize test environment with standard setup/teardown.
-
loadTranslations(
String locale, {String directory = 'assets/lang'}) → Future< void> - Load a real translation catalogue from disk for a widget test.