@@ -48,15 +48,15 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
48
48
// Tests for save()
49
49
//
50
50
51
- def " save() should saves file onto the filesystem " () {
51
+ def " save() should save a file onto the file system " () {
52
52
when :
53
53
strategy. save(multipartFile, imageInfoDto)
54
54
then :
55
55
1 * strategy. writeToFile(_ as MultipartFile , _ as Path ) >> { }
56
56
}
57
57
58
58
@SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
59
- def " save() should saves file onto the configured directory" () {
59
+ def " save() should save a file into a configured directory" () {
60
60
given :
61
61
String expectedDirectoryName = STORAGE_DIR
62
62
when :
@@ -69,7 +69,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
69
69
}
70
70
71
71
@SuppressWarnings ([' ClosureAsLastMethodParameter' , ' UnnecessaryReturnKeyword' ])
72
- def " save() should gives proper name to the file" () {
72
+ def " save() should give a proper name to a file" () {
73
73
given :
74
74
String expectedExtension = imageInfoDto. type. toLowerCase()
75
75
String expectedName = imageInfoDto. id
@@ -83,7 +83,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
83
83
}) >> { }
84
84
}
85
85
86
- def " save() should converts IOException to ImagePersistenceException" () {
86
+ def " save() should convert IOException to ImagePersistenceException" () {
87
87
given :
88
88
strategy. writeToFile(_ as MultipartFile , _ as Path ) >> { throw new IOException () }
89
89
when :
@@ -98,7 +98,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
98
98
// Tests for get()
99
99
//
100
100
101
- def " get() should returns null when file doesn't exist" () {
101
+ def " get() should return null when file doesn't exist" () {
102
102
given :
103
103
strategy. exists(_ as Path ) >> false
104
104
and :
@@ -109,7 +109,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
109
109
result == null
110
110
}
111
111
112
- def " get() should converts IOException to ImagePersistenceException" () {
112
+ def " get() should convert IOException to ImagePersistenceException" () {
113
113
given :
114
114
strategy. exists(_ as Path ) >> true
115
115
and :
0 commit comments