Update toString results

This commit is contained in:
Ashita Prasad
2023-09-20 08:47:34 +05:30
parent d577d2754f
commit f36d1ee094
2 changed files with 10 additions and 5 deletions

View File

@ -5,13 +5,18 @@ void main() {
const nmRow1 = NameValueModel(name: "harry", value: 23);
test('Testing toString()', () {
const nmRow1Expected = {"name": "harry", "value": 23};
expect(nmRow1.toJson(), nmRow1Expected);
const resultExpected = 'NameValueModel(name: harry, value: 23)';
expect(nmRow1.toString(), resultExpected);
});
test('Testing toJson()', () {
const resultExpected = {"name": "harry", "value": 23};
expect(nmRow1.toJson(), resultExpected);
});
test('Testing copyWith()', () {
const nmRow2Expected = NameValueModel(name: "winter", value: "26");
expect(nmRow1.copyWith(name: "winter", value: "26"), nmRow2Expected);
const resultExpected = NameValueModel(name: "winter", value: "26");
expect(nmRow1.copyWith(name: "winter", value: "26"), resultExpected);
});
test('Testing hashcode', () {

View File

@ -124,7 +124,7 @@ void main() {
"Request Name: foss42 api",
"Request Description: ",
"Request Tab Index: 0",
"Request Headers: [{content-length: 18}, {content-type: application/json; charset=utf-8}]",
"Request Headers: [NameValueModel(name: content-length, value: 18), NameValueModel(name: content-type, value: application/json; charset=utf-8)]",
"Request Params: null",
"Request Body Content Type: ContentType.json",
'Request Body: {\n"text":"WORLD"\n}',