Added assertThat() at the end of the test
This commit is contained in:
Родитель
18b5541dcc
Коммит
ea6b7dbfdc
|
@ -18,6 +18,7 @@ import com.microsoft.azure.spring.data.cosmosdb.domain.Role;
|
||||||
import com.microsoft.azure.spring.data.cosmosdb.domain.TimeToLiveSample;
|
import com.microsoft.azure.spring.data.cosmosdb.domain.TimeToLiveSample;
|
||||||
import com.microsoft.azure.spring.data.cosmosdb.repository.TestRepositoryConfig;
|
import com.microsoft.azure.spring.data.cosmosdb.repository.TestRepositoryConfig;
|
||||||
import com.microsoft.azure.spring.data.cosmosdb.repository.support.CosmosEntityInformation;
|
import com.microsoft.azure.spring.data.cosmosdb.repository.support.CosmosEntityInformation;
|
||||||
|
import org.assertj.core.api.Assertions;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
@ -32,6 +33,8 @@ import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(classes = TestRepositoryConfig.class)
|
@ContextConfiguration(classes = TestRepositoryConfig.class)
|
||||||
public class CosmosAnnotationIT {
|
public class CosmosAnnotationIT {
|
||||||
|
@ -83,12 +86,10 @@ public class CosmosAnnotationIT {
|
||||||
@Test
|
@Test
|
||||||
public void testTimeToLiveAnnotation() {
|
public void testTimeToLiveAnnotation() {
|
||||||
Integer timeToLive = sampleInfo.getTimeToLive();
|
Integer timeToLive = sampleInfo.getTimeToLive();
|
||||||
Assert.isTrue(timeToLive.equals(collectionSample.defaultTimeToLive()),
|
assertThat(timeToLive).isEqualTo(collectionSample.defaultTimeToLive());
|
||||||
"unmatched time to live value for class TimeToLiveSample");
|
|
||||||
|
|
||||||
timeToLive = roleInfo.getTimeToLive();
|
timeToLive = roleInfo.getTimeToLive();
|
||||||
Assert.isTrue(timeToLive.equals(collectionRole.defaultTimeToLive()),
|
assertThat(timeToLive).isEqualTo(collectionRole.defaultTimeToLive());
|
||||||
"unmatched time to live value for class Role");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Загрузка…
Ссылка в новой задаче