mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 02:19:08 +02:00
[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>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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>()));
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user