Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Uladzimir Paliukhovich committed Nov 1, 2023
1 parent d7a06b2 commit 4c7f4df
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/generator_tests/models_generator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void main() {
const className = 'Animals';
const propertyKey = 'Dog';
const jsonKeyExpectedResult = "\t@JsonKey(name: 'Dog')\n";
const fieldExpectedResult = '\tfinal Pet dog';
const fieldExpectedResult = '\tfinal Pet? dog';
final result = generator.generatePropertyContentBySchema(
map,
propertyName,
Expand All @@ -315,7 +315,7 @@ void main() {

const className = 'Animals';
const jsonKeyExpectedResult = "\t@JsonKey(name: 'Animals')\n";
const fieldExpectedResult = 'final Pet animals';
const fieldExpectedResult = 'final Pet? animals';
final result = generator.generatePropertiesContent(
SwaggerRoot.empty,
map,
Expand All @@ -342,7 +342,7 @@ void main() {

const className = 'Animals';
const jsonKeyExpectedResult = "\t@JsonKey(name: 'Animals')\n";
const fieldExpectedResult = 'final Pet animals';
const fieldExpectedResult = 'final Pet? animals';
final result = generator.generatePropertiesContent(
SwaggerRoot.empty,
map,
Expand All @@ -367,7 +367,7 @@ void main() {

const className = 'Animals';
const jsonKeyExpectedResult = "\t@JsonKey(name: 'animals')\n";
const fieldExpectedResult = 'final Pet animals';
const fieldExpectedResult = 'final Pet? animals';
final result = generator.generatePropertiesContent(
SwaggerRoot.empty,
map,
Expand All @@ -392,7 +392,7 @@ void main() {

const className = 'Animals';
const jsonKeyExpectedResult = "\t@JsonKey(name: '\\\$with')\n";
const fieldExpectedResult = 'final Pet \$with';
const fieldExpectedResult = 'final Pet? \$with';
final result = generator.generatePropertiesContent(
SwaggerRoot.empty,
map,
Expand Down Expand Up @@ -420,7 +420,7 @@ void main() {
const jsonKeyExpectedResult =
"@JsonKey(name: 'Dog', defaultValue: <Object>[])";

const propertyExpectedResult = 'final List<Object> dog';
const propertyExpectedResult = 'final List<Object>? dog';
final result = generator.generateListPropertyContent(
propertyName,
propertyKey,
Expand Down Expand Up @@ -480,7 +480,7 @@ void main() {
{},
);

expect(result, contains('final List<TestOriginalRef> dog;'));
expect(result, contains('final List<TestOriginalRef>? dog;'));
});

test('Should return List<Object> by ref', () {
Expand All @@ -503,7 +503,7 @@ void main() {
{},
);

expect(result, contains('final List<TestObject> dog;'));
expect(result, contains('final List<TestObject>? dog;'));
});
});

Expand Down

0 comments on commit 4c7f4df

Please sign in to comment.