/
NikolayIvkin
/
tutorials1
Обзор
Документация
Войти
/
NikolayIvkin
/
tutorials1
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
testing-modules/spring-testing/src/test/java/com/baeldung/scheduled/ScheduledIntegrationTest.java
22 строки
650 B
Eric Martin
Merge pull request #8125 from eugenp/revert-8119-BAEL-3275-2
01 ноя 2019, 04:43
01 ноя 2019, 04:43
3225470
Код
Авторство
О чём код?
package com.baeldung.scheduled; import com.baeldung.config.ScheduledConfig; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import static org.assertj.core.api.Assertions.assertThat; @SpringJUnitConfig(ScheduledConfig.class) public class ScheduledIntegrationTest { @Autowired Counter counter; @Test public void givenSleepBy100ms_whenGetInvocationCount_thenIsGreaterThanZero() throws InterruptedException { Thread.sleep(100L); assertThat(counter.getInvocationCount()).isGreaterThan(0); } }