Skip to content

Commit

Permalink
Fix wrong tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
comigor committed Sep 7, 2019
1 parent fbe6564 commit f9ef837
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
26 changes: 20 additions & 6 deletions test/query_generator/multiple_queries_test.dart
Expand Up @@ -83,10 +83,11 @@ void main() {
'a|lib/graphql_api.dart': '''// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart';
part 'graphql_api.g.dart';
@JsonSerializable(explicitToJson: true)
class SomeQuery {
class SomeQuery with EquatableMixin {
SomeQuery();
factory SomeQuery.fromJson(Map<String, dynamic> json) =>
Expand All @@ -96,18 +97,22 @@ class SomeQuery {
int i;
@override
List<Object> get props => [s, i];
Map<String, dynamic> toJson() => _\$SomeQueryToJson(this);
}
@JsonSerializable(explicitToJson: true)
class AnotherQuery {
class AnotherQuery with EquatableMixin {
AnotherQuery();
factory AnotherQuery.fromJson(Map<String, dynamic> json) =>
_\$AnotherQueryFromJson(json);
String s;
@override
List<Object> get props => [s];
Map<String, dynamic> toJson() => _\$AnotherQueryToJson(this);
}
''',
Expand Down Expand Up @@ -231,10 +236,11 @@ class AnotherQuery {
'a|lib/graphql_api.dart': '''// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart';
part 'graphql_api.g.dart';
@JsonSerializable(explicitToJson: true)
class SomeQuery {
class SomeQuery with EquatableMixin {
SomeQuery();
factory SomeQuery.fromJson(Map<String, dynamic> json) =>
Expand All @@ -244,23 +250,27 @@ class SomeQuery {
SomeQueryAnotherObject obj;
@override
List<Object> get props => [i, obj];
Map<String, dynamic> toJson() => _\$SomeQueryToJson(this);
}
@JsonSerializable(explicitToJson: true)
class SomeQueryAnotherObject {
class SomeQueryAnotherObject with EquatableMixin {
SomeQueryAnotherObject();
factory SomeQueryAnotherObject.fromJson(Map<String, dynamic> json) =>
_\$SomeQueryAnotherObjectFromJson(json);
String str;
@override
List<Object> get props => [str];
Map<String, dynamic> toJson() => _\$SomeQueryAnotherObjectToJson(this);
}
@JsonSerializable(explicitToJson: true)
class AnotherQuery {
class AnotherQuery with EquatableMixin {
AnotherQuery();
factory AnotherQuery.fromJson(Map<String, dynamic> json) =>
Expand All @@ -270,18 +280,22 @@ class AnotherQuery {
AnotherQueryAnotherObject obj;
@override
List<Object> get props => [s, obj];
Map<String, dynamic> toJson() => _\$AnotherQueryToJson(this);
}
@JsonSerializable(explicitToJson: true)
class AnotherQueryAnotherObject {
class AnotherQueryAnotherObject with EquatableMixin {
AnotherQueryAnotherObject();
factory AnotherQueryAnotherObject.fromJson(Map<String, dynamic> json) =>
_\$AnotherQueryAnotherObjectFromJson(json);
String str;
@override
List<Object> get props => [str];
Map<String, dynamic> toJson() => _\$AnotherQueryAnotherObjectToJson(this);
}
''',
Expand Down
17 changes: 14 additions & 3 deletions test/query_generator/query_generator_test.dart
Expand Up @@ -733,8 +733,12 @@ class SomeQueryQuery extends GraphQLQuery<SomeQuery, JsonSerializable> {
}, outputs: {
'a|lib/some_query.dart': '''// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart';
import 'package:decimal/decimal.dart';
part 'some_query.g.dart';
@JsonSerializable(explicitToJson: true)
class SomeQuery with EquatableMixin {
SomeQuery();
Expand Down Expand Up @@ -860,10 +864,11 @@ class SomeQuery with EquatableMixin {
'''// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart';
part 'some_query.g.dart';
@JsonSerializable(explicitToJson: true)
class SomeQuery {
class SomeQuery with EquatableMixin {
SomeQuery();
factory SomeQuery.fromJson(Map<String, dynamic> json) =>
Expand All @@ -873,11 +878,13 @@ class SomeQuery {
SomeQuerySomeObject o;
@override
List<Object> get props => [s, o];
Map<String, dynamic> toJson() => _\$SomeQueryToJson(this);
}
@JsonSerializable(explicitToJson: true)
class SomeQuerySomeObject {
class SomeQuerySomeObject with EquatableMixin {
SomeQuerySomeObject();
factory SomeQuerySomeObject.fromJson(Map<String, dynamic> json) =>
Expand All @@ -887,18 +894,22 @@ class SomeQuerySomeObject {
List<SomeQueryAnotherObject> ob;
@override
List<Object> get props => [st, ob];
Map<String, dynamic> toJson() => _\$SomeQuerySomeObjectToJson(this);
}
@JsonSerializable(explicitToJson: true)
class SomeQueryAnotherObject {
class SomeQueryAnotherObject with EquatableMixin {
SomeQueryAnotherObject();
factory SomeQueryAnotherObject.fromJson(Map<String, dynamic> json) =>
_\$SomeQueryAnotherObjectFromJson(json);
String str;
@override
List<Object> get props => [str];
Map<String, dynamic> toJson() => _\$SomeQueryAnotherObjectToJson(this);
}
''',
Expand Down

0 comments on commit f9ef837

Please sign in to comment.