interfasys / mediametadata

A cloud application which provides CRUD access to the metadata stored in images
GNU Affero General Public License v3.0
5 stars 1 forks source link

Issue #16: Added code for extraction of EXIF Data #32

Closed imjalpreet closed 8 years ago

imjalpreet commented 8 years ago

@oparoz I have added the extraction of EXIF Data. I will soon push the code for IPTC and XMP data as well after this gets merged.

oparoz commented 8 years ago

I think it would have been best to do it one field at a time. but no need to remove anything.

Add a unit test for date added, based on your previous work with Entity.

imjalpreet commented 8 years ago

@oparoz I am writing the test but I wanted to confirm one thing that in this test I have to test the Services(ExtractMetadata and StoreMetadata), right? or am I doing something wrong?

oparoz commented 8 years ago

As a general rule, all public methods have to be tested, so in this case, we're talking about the Services, including ImageDimension.

oparoz commented 8 years ago

Just add the tests one at a time until they all pass, but always thing about the various "paths", just like with ImageHooks. We don't just test when the method returns the expected result, but also when something goes wrong to make sure we catch these cases too.

imjalpreet commented 8 years ago

@oparoz I have added the tests for ExtractMetadata Service and StoreMetadata Service. I have made the StoreMetadata Service to work by overriding the ImageDimension service in the test but I am not able pass the extractMetadata test. Can you please check if both of them are correct?

imjalpreet commented 8 years ago

@oparoz After this test gets passed I think we can complete the extraction of all the three types quickly as I have already written the code and only tests will have to be added which will be just some addition to this code. I am trying to make it pass but if you have any suggestion, it would be helpful.