38 lines
1.0 KiB
Dart
38 lines
1.0 KiB
Dart
import 'package:logging/logging.dart';
|
|
import 'package:mumbullet/mumbullet.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group('LogManager', () {
|
|
test('should initialize with console logging', () {
|
|
final logManager = LogManager.getInstance();
|
|
|
|
// This test just verifies that initialization doesn't throw
|
|
expect(() => logManager.initialize(
|
|
level: Level.INFO,
|
|
logToConsole: true,
|
|
), returnsNormally);
|
|
|
|
logManager.close();
|
|
});
|
|
|
|
test('should log messages at different levels', () {
|
|
final logManager = LogManager.getInstance();
|
|
logManager.initialize(
|
|
level: Level.ALL,
|
|
logToConsole: true,
|
|
);
|
|
|
|
// This test just verifies that logging doesn't throw
|
|
expect(() {
|
|
logManager.debug('Debug message');
|
|
logManager.info('Info message');
|
|
logManager.warning('Warning message');
|
|
logManager.error('Error message');
|
|
}, returnsNormally);
|
|
|
|
logManager.close();
|
|
});
|
|
});
|
|
}
|