Skip to content

Commit 0b5a2f7

Browse files
committed
refactor: don't call init() method on the interface that doesn't have it.
This change is needed in order to simplify automated porting of tests. Part of 1246
1 parent 65d62d8 commit 0b5a2f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/groovy/ru/mystamps/web/feature/image/LegacyDatabaseImagePersistenceStrategyTest.groovy

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ class LegacyDatabaseImagePersistenceStrategyTest extends Specification {
3232
private ImagePersistenceStrategy strategy
3333

3434
def setup() {
35-
strategy = new DatabaseImagePersistenceStrategy(
35+
DatabaseImagePersistenceStrategy dbStrategy = new DatabaseImagePersistenceStrategy(
3636
NOPLogger.NOP_LOGGER,
3737
imageDataDao
3838
)
3939

4040
// init() does nothing except logging but by invoking it we're improving code coverage
41-
strategy.init()
41+
dbStrategy.init()
42+
43+
strategy = dbStrategy
4244
}
4345

4446
//

0 commit comments

Comments
 (0)