Update settings_model_test.dart

This commit is contained in:
Ashita Prasad
2024-02-08 06:08:22 +05:30
parent 5bdbb0b101
commit 40021954a4

View File

@ -12,6 +12,7 @@ void main() {
defaultUriScheme: "http",
defaultCodeGenLang: CodegenLanguage.curl,
saveResponses: true,
promptBeforeClosing: true,
);
test('Testing toJson()', () {
@ -25,6 +26,7 @@ void main() {
"defaultUriScheme": "http",
"defaultCodeGenLang": "curl",
"saveResponses": true,
"promptBeforeClosing": true
};
expect(sm.toJson(), expectedResult);
});
@ -40,6 +42,7 @@ void main() {
"defaultUriScheme": "http",
"defaultCodeGenLang": "curl",
"saveResponses": true,
"promptBeforeClosing": true
};
expect(SettingsModel.fromJson(input), sm);
});
@ -53,6 +56,7 @@ void main() {
defaultUriScheme: "http",
defaultCodeGenLang: CodegenLanguage.curl,
saveResponses: false,
promptBeforeClosing: true,
);
expect(
sm.copyWith(
@ -64,7 +68,7 @@ void main() {
test('Testing toString()', () {
const expectedResult =
"{isDark: false, alwaysShowCollectionPaneScrollbar: true, width: 300.0, height: 200.0, dx: 100.0, dy: 150.0, defaultUriScheme: http, defaultCodeGenLang: curl, saveResponses: true}";
"{isDark: false, alwaysShowCollectionPaneScrollbar: true, width: 300.0, height: 200.0, dx: 100.0, dy: 150.0, defaultUriScheme: http, defaultCodeGenLang: curl, saveResponses: true, promptBeforeClosing: true}";
expect(sm.toString(), expectedResult);
});