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
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