Files
hans ac82e93b9d [UNTESTED] Fixes notifiers and adds some additional methods. Adds tests.
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>
2025-04-29 14:16:17 +02:00

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>()));
});
});
}