Commit Graph

5 Commits

Author SHA1 Message Date
Maicol
be87c3fd0e
Port Junit test to Truth in the package com.google.gson of the module gson (#2299)
* Add the Truth dependency

* Port Junit test to Truth in the package `com.google.gson` of the module `gson`

* Replace the `assertThat(e.getMessage()).isEqualTo(...)"` with `assertThat(e).hasMessageThat().isEqualTo(...)`

* Minor fixes
2023-01-17 07:59:10 -08:00
Maicol
1a2170b99c
Port tests from JUnit 3 to JUnit 4 (#2294)
* Port tests from JUnit 3 to JUnit 4

* Port tests from JUnit 3 to JUnit 4

* Add `@Test` above `@Ignore`
2022-12-22 06:04:16 -08:00
Marcono1234
cd748df712
Fix LongSerializationPolicy null handling being inconsistent with Gson (#1990)
Gson does not actually use the specified LongSerializationPolicy but instead
uses type adapters which emulate the behavior. However, previously Gson's
implementation did not match LongSerializationPolicy regarding null handling.

Because it is rather unlikely that LongSerializationPolicy has been used on
its own, this commit adjusts its implementation to match Gson's behavior
(instead of the other way around).
2021-10-11 12:34:32 -07:00
Jesse Wilson
cc5cbe5a1f Integration test for long serialization policy. 2011-10-20 04:57:58 +00:00
Joel Leitch
e2cfc0cc19 Update GsonBuilder API to accept an enum for the serialize Long as string. This will be useful if/when we implement support to serialize a long type as an array of integers. 2009-01-11 06:11:29 +00:00