@@ -11,13 +11,81 @@ import java.util.*
11
11
class FileMetadataUtilsTest {
12
12
13
13
/* *
14
- * Test method to verify EXIF tags
14
+ * Test method to verify EXIF tags for "Author"
15
15
*/
16
16
@Test
17
- fun getTagsFromPref () {
17
+ fun getTagsFromPrefAuthor () {
18
18
val author = FileMetadataUtils .getTagsFromPref(" Author" )
19
19
val authorRef = arrayOf(TAG_ARTIST , TAG_CAMARA_OWNER_NAME );
20
20
21
21
assertTrue(Arrays .deepEquals(author, authorRef))
22
22
}
23
+
24
+ /* *
25
+ * Test method to verify EXIF tags for "Location"
26
+ */
27
+ @Test
28
+ fun getTagsFromPrefLocation () {
29
+ val author = FileMetadataUtils .getTagsFromPref(" Location" )
30
+ val authorRef = arrayOf(TAG_GPS_LATITUDE , TAG_GPS_LATITUDE_REF ,
31
+ TAG_GPS_LONGITUDE , TAG_GPS_LONGITUDE_REF ,
32
+ TAG_GPS_ALTITUDE , TAG_GPS_ALTITUDE_REF )
33
+
34
+ assertTrue(Arrays .deepEquals(author, authorRef))
35
+ }
36
+
37
+ /* *
38
+ * Test method to verify EXIF tags for "Copyright"
39
+ */
40
+ @Test
41
+ fun getTagsFromPrefCopyWright () {
42
+ val author = FileMetadataUtils .getTagsFromPref(" Copyright" )
43
+ val authorRef = arrayOf(TAG_COPYRIGHT )
44
+
45
+ assertTrue(Arrays .deepEquals(author, authorRef))
46
+ }
47
+
48
+ /* *
49
+ * Test method to verify EXIF tags for "Camera Model"
50
+ */
51
+ @Test
52
+ fun getTagsFromPrefCameraModel () {
53
+ val author = FileMetadataUtils .getTagsFromPref(" Camera Model" )
54
+ val authorRef = arrayOf(TAG_MAKE , TAG_MODEL )
55
+
56
+ assertTrue(Arrays .deepEquals(author, authorRef))
57
+ }
58
+
59
+ /* *
60
+ * Test method to verify EXIF tags for "Lens Model"
61
+ */
62
+ @Test
63
+ fun getTagsFromPrefLensModel () {
64
+ val author = FileMetadataUtils .getTagsFromPref(" Lens Model" )
65
+ val authorRef = arrayOf(TAG_LENS_MAKE , TAG_LENS_MODEL , TAG_LENS_SPECIFICATION )
66
+
67
+ assertTrue(Arrays .deepEquals(author, authorRef))
68
+ }
69
+
70
+ /* *
71
+ * Test method to verify EXIF tags for "Serial Numbers"
72
+ */
73
+ @Test
74
+ fun getTagsFromPrefSerialNumbers () {
75
+ val author = FileMetadataUtils .getTagsFromPref(" Serial Numbers" )
76
+ val authorRef = arrayOf(TAG_BODY_SERIAL_NUMBER , TAG_LENS_SERIAL_NUMBER )
77
+
78
+ assertTrue(Arrays .deepEquals(author, authorRef))
79
+ }
80
+
81
+ /* *
82
+ * Test method to verify EXIF tags for "Software"
83
+ */
84
+ @Test
85
+ fun getTagsFromPrefSoftware () {
86
+ val author = FileMetadataUtils .getTagsFromPref(" Software" )
87
+ val authorRef = arrayOf(TAG_SOFTWARE )
88
+
89
+ assertTrue(Arrays .deepEquals(author, authorRef))
90
+ }
23
91
}
0 commit comments