You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing message serialization/deserialization, I haven't found a way to let Lancaster deserialize JSON messages, so currently the testdata is simply in EDN form so I can compare immediately. Maybe if I read my JSON file in binary mode as bytes array I can get it to work with l/deserialize, that's worth looking into. Anyways, the thing that needs leveraging is the mapping of JSON field names to the EDN keywords, like `"fromAtoC" -> :from-ato-c'.
In some test cases it's not necessary to write to file, and simply using the Lancaster schema object immediately makes more sense.
Note: core.clj is getting cluttered a bit with high-level user functions that might need to go in some separate namespace at some point (like store-in-db and generate-avro-schema).
More actual unit tests need to be written anyways...
Lots of repetition in test logic: use abstractions and fixtures would clean up a lot.
In fact, currently when an assertion fails the file-deletion clean-up doesn't even occur, which is technically a bug in the tests.
Issues:
l/deserialize, that's worth looking into. Anyways, the thing that needs leveraging is the mapping of JSON field names to the EDN keywords, like `"fromAtoC" -> :from-ato-c'.core.cljis getting cluttered a bit with high-level user functions that might need to go in some separate namespace at some point (likestore-in-dbandgenerate-avro-schema).