Skip to content

Commit 0d33a37

Browse files
committed
removing redis tail
1 parent b3352aa commit 0d33a37

3 files changed

Lines changed: 10 additions & 32 deletions

File tree

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies {
3030
compileOnly 'org.projectlombok:lombok'
3131
developmentOnly 'org.springframework.boot:spring-boot-devtools'
3232
annotationProcessor 'org.projectlombok:lombok'
33+
3334
testImplementation 'org.springframework.boot:spring-boot-starter-test'
3435
testImplementation 'io.projectreactor:reactor-test'
3536
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' //temp

src/main/java/br/com/cezarcruz/javabank/gateway/out/cache/redis/RedisCacheWrapper.java

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
package br.com.cezarcruz.javabank.gateway.out.schedule;
22

3-
import br.com.cezarcruz.javabank.gateway.out.cache.redis.RedisCacheWrapper;
3+
import br.com.cezarcruz.javabank.gateway.out.cache.Cache;
44
import org.junit.jupiter.api.Test;
55
import org.junit.jupiter.api.extension.ExtendWith;
66
import org.mockito.InjectMocks;
7-
import org.mockito.Mock;
7+
import org.mockito.Spy;
88
import org.mockito.junit.jupiter.MockitoExtension;
99

10-
import static org.mockito.ArgumentMatchers.any;
11-
import static org.mockito.Mockito.doNothing;
12-
import static org.mockito.Mockito.verify;
13-
1410
@ExtendWith(MockitoExtension.class)
1511
class UpdateCacheSchedulerTest {
1612

17-
@Mock
18-
private RedisCacheWrapper redisCache;
13+
@Spy
14+
private Cache cache = new Cache() {
15+
@Override
16+
public void put(String key) {
17+
System.out.println(key);
18+
}
19+
};
1920

2021
@InjectMocks
2122
private UpdateCacheScheduler updateCacheScheduler;
2223

2324
@Test
2425
void justRun() {
25-
doNothing().when(redisCache).put(any());
2626
updateCacheScheduler.run();
27-
28-
verify(redisCache).put(any());
2927
}
3028

3129
}

0 commit comments

Comments
 (0)