Skip to content

Commit 5a64839

Browse files
committed
FilesystemImagePersistenceStrategyTest: improve test cases names.
No functional changes.
1 parent 9d47a0a commit 5a64839

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/groovy/ru/mystamps/web/service/FilesystemImagePersistenceStrategyTest.groovy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
4848
// Tests for save()
4949
//
5050

51-
def "save() should saves file onto the filesystem"() {
51+
def "save() should save a file onto the file system"() {
5252
when:
5353
strategy.save(multipartFile, imageInfoDto)
5454
then:
5555
1 * strategy.writeToFile(_ as MultipartFile, _ as Path) >> { }
5656
}
5757

5858
@SuppressWarnings(['ClosureAsLastMethodParameter', 'UnnecessaryReturnKeyword'])
59-
def "save() should saves file onto the configured directory"() {
59+
def "save() should save a file into a configured directory"() {
6060
given:
6161
String expectedDirectoryName = STORAGE_DIR
6262
when:
@@ -69,7 +69,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
6969
}
7070

7171
@SuppressWarnings(['ClosureAsLastMethodParameter', 'UnnecessaryReturnKeyword'])
72-
def "save() should gives proper name to the file"() {
72+
def "save() should give a proper name to a file"() {
7373
given:
7474
String expectedExtension = imageInfoDto.type.toLowerCase()
7575
String expectedName = imageInfoDto.id
@@ -83,7 +83,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
8383
}) >> { }
8484
}
8585

86-
def "save() should converts IOException to ImagePersistenceException"() {
86+
def "save() should convert IOException to ImagePersistenceException"() {
8787
given:
8888
strategy.writeToFile(_ as MultipartFile, _ as Path) >> { throw new IOException() }
8989
when:
@@ -98,7 +98,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
9898
// Tests for get()
9999
//
100100

101-
def "get() should returns null when file doesn't exist"() {
101+
def "get() should return null when file doesn't exist"() {
102102
given:
103103
strategy.exists(_ as Path) >> false
104104
and:
@@ -109,7 +109,7 @@ class FilesystemImagePersistenceStrategyTest extends Specification {
109109
result == null
110110
}
111111

112-
def "get() should converts IOException to ImagePersistenceException"() {
112+
def "get() should convert IOException to ImagePersistenceException"() {
113113
given:
114114
strategy.exists(_ as Path) >> true
115115
and:

0 commit comments

Comments
 (0)