Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variantのフィールドに変更があるとJSONシリアライザのテストが落ちてしまう #851

Open
ty-v1 opened this issue Mar 18, 2021 · 0 comments

Comments

@ty-v1
Copy link
Contributor

ty-v1 commented Mar 18, 2021

#819 により,Variantのシリアライズ処理が変わった.

Gsonのカスタムシリアライザを極力使わずに,クラスをそのままJSONにマッピングするようにした.
そのため,Variantのフィールド名が変わったり,フィールドが増えたりすると,JSONの構造が変わってしまうため,テストが落ちてしまう.

落ちうるテスト

assertThat(serializedVariantKey).containsOnly(//
JsonKeyAlias.Variant.ID, //
JsonKeyAlias.Variant.FITNESS, //
JsonKeyAlias.Variant.GENERATION_NUMBER, //
JsonKeyAlias.Variant.IS_BUILD_SUCCESS, //
JsonKeyAlias.Variant.OPERATION, //
JsonKeyAlias.Variant.TEST_SUMMARY, //
JsonKeyAlias.Variant.SELECTION_COUNT, //
JsonKeyAlias.Variant.PATCH, //
JsonKeyAlias.Variant.IS_SYNTAX_VALID, //
JsonKeyAlias.Variant.BASES, //
JsonKeyAlias.Variant.GENERATED_SOURCE_CODE, //
JsonKeyAlias.Variant.SUSPICIOUSNESSES //
);

@ty-v1 ty-v1 changed the title フィールドを追加するとJSONシリアライザのテストを書き換える必要がある Variantのフィールドの変更・追加があるとJSONシリアライザのテストを書き換える必要がある Mar 18, 2021
@ty-v1 ty-v1 changed the title Variantのフィールドの変更・追加があるとJSONシリアライザのテストを書き換える必要がある Variantのフィールドの変更・追加があるとJSONシリアライザのテストが落ちてしまう Mar 18, 2021
@ty-v1 ty-v1 changed the title Variantのフィールドの変更・追加があるとJSONシリアライザのテストが落ちてしまう Variantのフィールドに変更があるとJSONシリアライザのテストが落ちてしまう Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant