Fixed assert that address test case

This commit is contained in:
Kushagra Thapar 2020-02-10 09:39:29 -08:00
Родитель 5bc410d4b5
Коммит ed2314b8ca
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -28,6 +28,7 @@ import java.util.List;
import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = TestRepositoryConfig.class)
@ -84,7 +85,11 @@ public class AddressRepositoryIT {
final Optional<Address> addressById = repository.findById(TEST_ADDRESS1_PARTITION1.getPostalCode(),
new PartitionKey(entityInformation.getPartitionKeyFieldValue(TEST_ADDRESS1_PARTITION1)));
assertThat(addressById.equals(TEST_ADDRESS1_PARTITION1));
if (!addressById.isPresent()) {
fail("address not found");
return;
}
assertThat(addressById.get().equals(TEST_ADDRESS1_PARTITION1));
}
@Test