mirror of
https://github.com/foss42/apidash.git
synced 2025-05-23 01:06:46 +08:00
20 lines
541 B
Dart
20 lines
541 B
Dart
import 'package:test/test.dart';
|
|
import 'package:apidash/models/models.dart';
|
|
import 'request_models.dart';
|
|
|
|
void main() {
|
|
test('Testing copyWith', () {
|
|
final requestModelcopyWith = testRequestModel.copyWith(name: 'API foss42');
|
|
expect(requestModelcopyWith.name, 'API foss42');
|
|
});
|
|
|
|
test('Testing toJson', () {
|
|
expect(testRequestModel.toJson(), requestModelJson);
|
|
});
|
|
|
|
test('Testing fromJson', () {
|
|
final modelFromJson = RequestModel.fromJson(requestModelJson);
|
|
expect(modelFromJson, testRequestModel);
|
|
});
|
|
}
|