Update request_model_test.dart

This commit is contained in:
Ashita Prasad
2024-01-08 00:17:42 +05:30
parent 61ea8ff277
commit 472f296d32

View File

@ -156,6 +156,29 @@ void main() {
test('Testing toString', () {
expect(requestModelDup.toString(), requestModeDupString);
});
test('Testing getters', () {
expect(requestModel.enabledRequestHeaders, const [
NameValueModel(name: 'content-length', value: '18'),
NameValueModel(
name: 'content-type', value: 'application/json; charset=utf-8')
]);
expect(requestModel.enabledRequestParams, null);
expect(requestModel.enabledHeadersMap, {
'content-length': '18',
'content-type': 'application/json; charset=utf-8'
});
expect(requestModel.enabledParamsMap, {});
expect(requestModel.headersMap, {
'content-length': '18',
'content-type': 'application/json; charset=utf-8'
});
expect(requestModel.paramsMap, {});
expect(requestModel.formDataMapList, []);
expect(requestModel.isFormDataRequest, false);
expect(requestModel.hasContentTypeHeader, true);
});
test('Testing hashcode', () {
expect(requestModel.hashCode, greaterThan(0));
});