Added assertThat() at the end of the test

This commit is contained in:
Kushagra Thapar 2020-04-03 13:59:38 -07:00
Родитель 18b5541dcc
Коммит ea6b7dbfdc
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -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.repository.TestRepositoryConfig;
import com.microsoft.azure.spring.data.cosmosdb.repository.support.CosmosEntityInformation;
import org.assertj.core.api.Assertions;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
@ -32,6 +33,8 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.Assert;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = TestRepositoryConfig.class)
public class CosmosAnnotationIT {
@ -83,12 +86,10 @@ public class CosmosAnnotationIT {
@Test
public void testTimeToLiveAnnotation() {
Integer timeToLive = sampleInfo.getTimeToLive();
Assert.isTrue(timeToLive.equals(collectionSample.defaultTimeToLive()),
"unmatched time to live value for class TimeToLiveSample");
assertThat(timeToLive).isEqualTo(collectionSample.defaultTimeToLive());
timeToLive = roleInfo.getTimeToLive();
Assert.isTrue(timeToLive.equals(collectionRole.defaultTimeToLive()),
"unmatched time to live value for class Role");
assertThat(timeToLive).isEqualTo(collectionRole.defaultTimeToLive());
}
@Test