superarts / XStringCatalog

A framework that generates enum from xcstring - Swift enumerations from String Catalog for iOS / iPadOS / macOS / tvOS.
MIT License
4 stars 9 forks source link

Refactored code in main.swift and added XC Tests #7

Closed Anish0999 closed 9 months ago

Anish0999 commented 9 months ago

I've refactored the code in the main.swift file into 3 subsections:

-FileManager -> Handles reading from and writing to data sources. -JSONParser -> Parses and validates JSON data structures. -EnumCodeGenerator -> Creates Swift enumeration code from JSON definitions.

By refactoring the code into these isolated chunks, I'm able to test each part individually. I've created XC Tests for these. These tests did not use the given Frameworks Quick and Nimble.

Note: I've created a new Swift file with the main.swift code refactored as well as another new swift file for the XC tests for the new refactored code