2026-08-24 06:41:47 +09:00
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
|
import 'package:iperf3gui/domain/models/iperf3_result.dart';
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
group('Iperf3Result', () {
|
|
|
|
|
test('can be instantiated with raw output', () {
|
|
|
|
|
const result = Iperf3Result(
|
|
|
|
|
rawOutput: 'Test complete',
|
|
|
|
|
exitCode: 0,
|
|
|
|
|
);
|
|
|
|
|
expect(result.rawOutput, equals('Test complete'));
|
|
|
|
|
expect(result.exitCode, equals(0));
|
|
|
|
|
});
|
2026-08-26 19:03:59 +09:00
|
|
|
|
|
|
|
|
test('stopped defaults to false', () {
|
|
|
|
|
const result = Iperf3Result(rawOutput: 'x', exitCode: 0);
|
|
|
|
|
expect(result.stopped, isFalse);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('stopped is preserved when set', () {
|
|
|
|
|
const result = Iperf3Result(rawOutput: 'x', exitCode: 0, stopped: true);
|
|
|
|
|
expect(result.stopped, isTrue);
|
|
|
|
|
});
|
2026-08-24 06:41:47 +09:00
|
|
|
});
|
|
|
|
|
}
|