diff --git a/lib/credential/data/mappers/claim_mapper.dart b/lib/credential/data/mappers/claim_mapper.dart index 44b88dab..c15726ac 100644 --- a/lib/credential/data/mappers/claim_mapper.dart +++ b/lib/credential/data/mappers/claim_mapper.dart @@ -29,9 +29,8 @@ class ClaimMapper extends Mapper { schema: from.schema, type: from.type, info: _claimInfoMapper.mapFrom(from.info), - displayType: from.displayType == null - ? _displayTypeMapper.mapFrom(displayType) - : null, + displayType: + displayType != null ? _displayTypeMapper.mapFrom(displayType) : null, credentialRawValue: from.credentialRawValue, ); } @@ -49,7 +48,7 @@ class ClaimMapper extends Mapper { schema: to.schema, info: _claimInfoMapper.mapTo(to.info), displayType: - to.displayType == null ? null : _displayTypeMapper.mapTo(displayType), + displayType != null ? _displayTypeMapper.mapTo(displayType) : null, credentialRawValue: to.credentialRawValue, ); } diff --git a/lib/credential/data/mappers/display_type_mapper.dart b/lib/credential/data/mappers/display_type_mapper.dart index b4272c0f..436e0c27 100644 --- a/lib/credential/data/mappers/display_type_mapper.dart +++ b/lib/credential/data/mappers/display_type_mapper.dart @@ -18,10 +18,3 @@ class DisplayTypeMapper extends Mapper?, DisplayType?> { return json; } } - -class DisplayTypeMapperParam { - final String type; - final Map json; - - DisplayTypeMapperParam(this.type, this.json); -} diff --git a/test/credential/data/mappers/claim_mapper_test.dart b/test/credential/data/mappers/claim_mapper_test.dart index 82ac3a41..3abdc964 100644 --- a/test/credential/data/mappers/claim_mapper_test.dart +++ b/test/credential/data/mappers/claim_mapper_test.dart @@ -71,8 +71,7 @@ void main() { expect(verify(infoMapper.mapFrom(captureAny)).captured.first, fetchClaimDTO.credential); expect(verify(stateMapper.mapFrom(captureAny)).captured.first, ''); - expect( - verify(displayTypeMapper.mapFrom(captureAny)).captured.first, null); + verifyNever(displayTypeMapper.mapFrom(captureAny)); }); });