Committed by
Gerrit Code Review
Registier Frequency to Kryo
Change-Id: I4e91c4f48197ed2aa46d6458e1f397eea3468b8f
Showing
2 changed files
with
7 additions
and
0 deletions
| ... | @@ -210,6 +210,7 @@ public final class KryoNamespaces { | ... | @@ -210,6 +210,7 @@ public final class KryoNamespaces { |
| 210 | .register(new Ip6AddressSerializer(), Ip6Address.class) | 210 | .register(new Ip6AddressSerializer(), Ip6Address.class) |
| 211 | .register(new MacAddressSerializer(), MacAddress.class) | 211 | .register(new MacAddressSerializer(), MacAddress.class) |
| 212 | .register(VlanId.class) | 212 | .register(VlanId.class) |
| 213 | + .register(Frequency.class) | ||
| 213 | .build(); | 214 | .build(); |
| 214 | 215 | ||
| 215 | /** | 216 | /** | ... | ... |
| ... | @@ -343,6 +343,12 @@ public class KryoSerializerTest { | ... | @@ -343,6 +343,12 @@ public class KryoSerializerTest { |
| 343 | testSerializable(new DefaultLinkResourceAllocations(request, allocations)); | 343 | testSerializable(new DefaultLinkResourceAllocations(request, allocations)); |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | + | ||
| 347 | + @Test | ||
| 348 | + public void testFrequency() { | ||
| 349 | + testSerializedEquals(Frequency.ofGHz(100)); | ||
| 350 | + } | ||
| 351 | + | ||
| 346 | @Test | 352 | @Test |
| 347 | public void testLambdaConstraint() { | 353 | public void testLambdaConstraint() { |
| 348 | testSerializable(new LambdaConstraint(Lambda.valueOf(1))); | 354 | testSerializable(new LambdaConstraint(Lambda.valueOf(1))); | ... | ... |
-
Please register or login to post a comment