Commit Graph

25 Commits

Author SHA1 Message Date
Maicol 49b00d1a86
Port all Junit assert to Truth asserts (#2304)
* Port Junit assert to Truth in `com.google.gson.stream`

* Port Junit assert to Truth in `com.google.gson.regression`

* Port Junit assert to Truth in `om.google.gson.reflect`

* Port Junit assert to Truth in `com.google.gson.metrics`

* Port Junit assert to Truth in `com.google.gson.internal`

* Port Junit assert to Truth in `com.google.gson.internal.sql`

* Port Junit assert to Truth in `com.google.gson.internal.reflect`

* Port Junit assert to Truth in `com.google.gson.internal.bind`

* Port Junit assert to Truth in `com.google.gson.internal.bind.util`

* Port Junit assert to Truth in `com.google.gson.functional`

* Replaces `List.of` with `Arrays.asList` to grant legacy

* Simplify `==` asserts

* Simplify `.contain()` asserts + Minor fixes

* Simplify asserts
2023-01-31 11:20:54 -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 6c27553c83
Improve exception message for duplicate field names (#2251) 2022-12-04 17:27:43 -08:00
yixingz3 eaf9a0342d
feat: added UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy (#2024) 2021-11-28 09:33:22 -08:00
inder123 1b28ff3cda
Added a test for deserialization of fields using lowercase-dot naming policy (#1303) 2018-04-27 18:54:48 -07:00
Leon ab35f11077 add FieldNamingPolicy.LOWER_CASE_WITH_DOTS (#1278) 2018-04-27 18:50:08 -07:00
Inderjeet Singh e5b3f6368d updated minimum JDK version to 1.6.
Added Overrides for methods implementing an interface.
2015-11-04 18:52:20 -08:00
Jesse Wilson 3a3870591e Tests to demonstrate that GSON 2 fixes some user-reported bugs. 2011-10-02 15:18:12 +00:00
Inderjeet Singh 5c620c7e0a Changed Gson behavior to reject duplicate fields in a class. 2011-08-03 03:05:12 +00:00
Joel Leitch 4917fc7f76 Lift restriction on naming when using the "@SerializedNamed" annotation.
Fix for Issue 290.
2011-04-12 17:29:19 +00:00
Inderjeet Singh 4bd261ae06 Made FieldNamingStrategy2 and its corresponding builder method package-private. 2011-04-07 17:41:35 +00:00
Inderjeet Singh 52288d7127 rawtypes -> unchecked
Fixed spurious eclipse warnings on deprecation, missing classes or parameters, etc.
2011-02-24 22:47:55 +00:00
Joel Leitch 9cd72ca7fb Add new tests with SerializedName annotation that contains a space in the name. 2010-05-28 02:13:11 +00:00
Joel Leitch ba0154867d Add support to allow spaces in the JSON field name. 2010-05-26 17:40:19 +00:00
Joel Leitch bf2a0e4e0b Adding tests to ensure the adapter from the old to new naming strategy is working properly. 2010-01-10 03:27:59 +00:00
Joel Leitch fbf834c3f6 Implemented suggests from r469 code review. 2009-10-02 20:33:37 +00:00
Joel Leitch 0c2106f2ff Adding test for new field naming policies from r456 code review. 2009-10-02 19:12:15 +00:00
Joel Leitch 8297437610 Reverting r499. 2009-09-23 19:25:50 +00:00
Joel Leitch c6f762f36b Fix Warnings 2009-09-23 19:09:01 +00:00
Inderjeet Singh 3b0f8f4340 Removed all the JDK warnings about unused fields in test classes or unused constructors for use by Gson or instanceof calls on parameterized types. 2009-09-23 17:45:16 +00:00
Joel Leitch 18b301dfeb - Serializing of Object arrays.
- Fixed incorrect warning
2009-09-22 19:04:27 +00:00
Inderjeet Singh 82771f006c removed Java 1.5 warnings 2009-08-31 17:51:47 +00:00
Joel Leitch a82c400dc8 Fix warnings. 2008-11-30 00:47:07 +00:00
Joel Leitch c9e48097ec Do not overwrite a duplicate field value during seriailzation if one those fields is null. 2008-11-27 00:50:50 +00:00
Inderjeet Singh 57d1f32de5 moved gson as a project under trunk 2008-09-01 03:13:32 +00:00