๐Ÿ” Project: JSON Model Tests

๐Ÿ“š Lesson 10: Testing Your Code โฑ 25-30 min ๐Ÿ“Š Intermediate
๐ŸŽฏ Objective

Write comprehensive tests for JSON parsing models. Test with valid data, invalid data, missing fields, and edge cases to ensure robust data handling.

Requirements

  1. Test successful parsing of valid JSON
  2. Test that FormatException is thrown for invalid JSON
  3. Test optional fields (null vs present)
  4. Test round-trip (parse โ†’ serialize โ†’ reparse)
  5. Test nested object parsing
  6. Use test fixtures (sample JSON data)