File tree Expand file tree Collapse file tree 2 files changed +5
-34
lines changed
webauthn-server-attestation/src/test/scala/com/yubico/fido/metadata
webauthn-server-core/src/test/scala/com/yubico/webauthn/data Expand file tree Collapse file tree 2 files changed +5
-34
lines changed Original file line number Diff line number Diff line change @@ -47,23 +47,6 @@ class JsonIoSpec
47
47
def test [A ](tpe : TypeReference [A ])(implicit a : Arbitrary [A ]): Unit = {
48
48
val cn = tpe.getType.getTypeName
49
49
describe(s " ${cn}" ) {
50
- it(" can be serialized to JSON." ) {
51
- forAll { value : A =>
52
- val encoded : String = json.writeValueAsString(value)
53
-
54
- encoded should not be empty
55
- }
56
- }
57
-
58
- it(" can be deserialized from JSON." ) {
59
- forAll { value : A =>
60
- val encoded : String = json.writeValueAsString(value)
61
- val decoded : A = json.readValue(encoded, tpe)
62
-
63
- decoded should equal(value)
64
- }
65
- }
66
-
67
50
it(" is identical after multiple serialization round-trips." ) {
68
51
forAll { value : A =>
69
52
val encoded : String = json.writeValueAsString(value)
Original file line number Diff line number Diff line change @@ -61,32 +61,20 @@ class JsonIoSpec
61
61
def test [A ](tpe : TypeReference [A ])(implicit a : Arbitrary [A ]): Unit = {
62
62
val cn = tpe.getType.getTypeName
63
63
describe(s " ${cn}" ) {
64
- it(" can be serialized to JSON ." ) {
64
+ it(" is identical after multiple serialization round-trips. ." ) {
65
65
forAll { value : A =>
66
66
val encoded : String = json.writeValueAsString(value)
67
67
68
- encoded should not be empty
69
- }
70
- }
71
-
72
- it(" can be deserialized from JSON." ) {
73
- forAll { value : A =>
74
- val encoded : String = json.writeValueAsString(value)
75
68
val decoded : A = json.readValue(encoded, tpe)
76
-
77
69
decoded should equal(value)
78
- }
79
- }
80
70
81
- it(" is identical after multiple serialization round-trips.." ) {
82
- forAll { value : A =>
83
- val encoded : String = json.writeValueAsString(value)
84
- val decoded : A = json.readValue(encoded, tpe)
85
71
val recoded : String = json.writeValueAsString(decoded)
86
-
87
- decoded should equal(value)
88
72
recoded should equal(encoded)
73
+
74
+ val redecoded : A = json.readValue(recoded, tpe)
75
+ redecoded should equal(value)
89
76
}
77
+
90
78
}
91
79
}
92
80
}
You can’t perform that action at this time.
0 commit comments