mirror of
https://github.com/foss42/apidash.git
synced 2025-12-16 02:44:08 +08:00
Adding tests for KVRow Model
This commit is contained in:
16
test/models/kvrow_model_test.dart
Normal file
16
test/models/kvrow_model_test.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:apidash/models/kvrow_model.dart';
|
||||
|
||||
void main() {
|
||||
KVRow kvRow1 = const KVRow("harry", 23);
|
||||
String kvRow1Expected = "{harry: 23}";
|
||||
|
||||
test('Testing toString()', () {
|
||||
expect(kvRow1.toString(), kvRow1Expected);
|
||||
});
|
||||
|
||||
KVRow kvRow2Expected = const KVRow("winter", "26");
|
||||
test('Testing copyWith()', () {
|
||||
expect(kvRow1.copyWith(k: "winter", v: "26"), kvRow2Expected);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user