mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 10:29:06 +02:00
ac82e93b9d
Changes: // ArcaneEnvironment breaking: context.read<ArcaneEnvironment>() -> ArcaneEnvironment.of(context) breaking: context.read<ArcaneEnvironment>().state -> ArcaneEnvironment.of(context).environment; // Feature flag service added: reset() // Logging service added: registerInterface() added: unregisterInterfaces() added: unregisterAllInterfaces() // ArcaneReactiveTheme fixed: currentMode, dark, light now actually emit new values when changed added: getters for lightTheme, darkTheme, and systemTheme TODO: test systemTheme Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
23 lines
698 B
Dart
23 lines
698 B
Dart
import "package:arcane_framework/arcane_framework.dart";
|
|
import "package:flutter_test/flutter_test.dart";
|
|
import "package:mockito/mockito.dart";
|
|
|
|
class MockLoggingInterface extends Mock implements LoggingInterface {}
|
|
|
|
void main() {
|
|
setUpAll(() {
|
|
ArcaneFeatureFlags.I.reset();
|
|
ArcaneAuthenticationService.I.reset();
|
|
ArcaneReactiveTheme.I.reset();
|
|
});
|
|
|
|
group("Arcane", () {
|
|
test("services getter returns all core services", () {
|
|
final services = Arcane.services;
|
|
expect(services, contains(isA<ArcaneFeatureFlags>()));
|
|
expect(services, contains(isA<ArcaneAuthenticationService>()));
|
|
expect(services, contains(isA<ArcaneReactiveTheme>()));
|
|
});
|
|
});
|
|
}
|