File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
test/LEGO.AsyncAPI.Tests/Models Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,6 @@ public void Deserialize_WithMetadata_CreatesMetadata()
19
19
"type": "record",
20
20
"name": "SomeEvent",
21
21
"namespace": "my.namspace.for.event",
22
- "example": {
23
- "occurredOn": "2023-11-03T09:59:56.582908743Z",
24
- "partnerId": "1",
25
- "platformSource": "Brecht",
26
- "countryCode": "DE"
27
- },
28
22
"fields": [
29
23
{
30
24
"name": "countryCode",
@@ -46,11 +40,23 @@ public void Deserialize_WithMetadata_CreatesMetadata()
46
40
"type": "string",
47
41
"doc": "Platform source"
48
42
}
49
- ]
43
+ ],
44
+ "example": {
45
+ "occurredOn": "2023-11-03T09:56.582+00:00",
46
+ "partnerId": "1",
47
+ "platformSource": "Brecht",
48
+ "countryCode": "DE"
49
+ }
50
50
}
51
51
""" ;
52
52
var model = new AsyncApiStringReader ( ) . ReadFragment < AvroSchema > ( input , AsyncApiVersion . AsyncApi2_0 , out var diag ) ;
53
53
model . Metadata . Should ( ) . HaveCount ( 1 ) ;
54
+ var reserialized = model . SerializeAsJson ( AsyncApiVersion . AsyncApi2_0 ) ;
55
+
56
+ // Assert
57
+ input . Should ( )
58
+ . BePlatformAgnosticEquivalentTo ( reserialized ) ;
59
+
54
60
}
55
61
56
62
[ Test ]
You can’t perform that action at this time.
0 commit comments