public abstract class MongoLockRepositoryITestBase extends IntegrationTestBase implements MongoLockRepositoryITestInterface
| Modifier and Type | Field and Description |
|---|---|
protected LockRepositoryWithEntity<org.bson.Document> |
repository |
CHANGELOG_COLLECTION_NAME, DEFAULT_DATABASE_NAME| Constructor and Description |
|---|
MongoLockRepositoryITestBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureKeyUniqueness() |
void |
findByKeyShouldReturnLockWhenThereIsOne() |
void |
insertUpdateShouldInsertWhenEmpty() |
void |
insertUpdateShouldThrowExceptionWhenLockIsInDBWIthDifferentOwnerAndNotExpired() |
void |
insertUpdateShouldUpdateWhenExpiresAtIsGraterThanSaved() |
void |
insertUpdateShouldUpdateWhenSameOwner() |
void |
removeShouldNotRemoveWhenDifferentOwner() |
void |
removeShouldRemoveWhenSameOwner() |
void |
updateIfSameOwnerShouldNotInsertWhenEmpty() |
void |
updateIfSameOwnerShouldNotUpdateWhenDifferentOwnerAndExpiresAtIsNotGrater() |
void |
updateIfSameOwnerShouldNotUpdateWhenExpiresAtIsGraterThanSavedButOtherOwner() |
void |
updateIfSameOwnerShouldUpdateWhenSameOwner() |
getAdapter, getDataBase, getDefaultAdapter, getMongoClientclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeRepositoryprotected LockRepositoryWithEntity<org.bson.Document> repository
@Test public void ensureKeyUniqueness()
ensureKeyUniqueness in interface MongoLockRepositoryITestInterface@Test
public void findByKeyShouldReturnLockWhenThereIsOne()
throws LockPersistenceException,
MongockException
findByKeyShouldReturnLockWhenThereIsOne in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void insertUpdateShouldInsertWhenEmpty()
throws LockPersistenceException,
MongockException
insertUpdateShouldInsertWhenEmpty in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void insertUpdateShouldUpdateWhenExpiresAtIsGraterThanSaved()
throws LockPersistenceException,
MongockException
insertUpdateShouldUpdateWhenExpiresAtIsGraterThanSaved in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void insertUpdateShouldUpdateWhenSameOwner()
throws LockPersistenceException,
MongockException
insertUpdateShouldUpdateWhenSameOwner in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void insertUpdateShouldThrowExceptionWhenLockIsInDBWIthDifferentOwnerAndNotExpired()
throws LockPersistenceException,
MongockException
insertUpdateShouldThrowExceptionWhenLockIsInDBWIthDifferentOwnerAndNotExpired in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void removeShouldRemoveWhenSameOwner()
throws LockPersistenceException,
MongockException
removeShouldRemoveWhenSameOwner in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void removeShouldNotRemoveWhenDifferentOwner()
throws LockPersistenceException,
MongockException
removeShouldNotRemoveWhenDifferentOwner in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void updateIfSameOwnerShouldNotInsertWhenEmpty()
throws LockPersistenceException,
MongockException
updateIfSameOwnerShouldNotInsertWhenEmpty in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void updateIfSameOwnerShouldNotUpdateWhenExpiresAtIsGraterThanSavedButOtherOwner()
throws LockPersistenceException,
MongockException
updateIfSameOwnerShouldNotUpdateWhenExpiresAtIsGraterThanSavedButOtherOwner in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void updateIfSameOwnerShouldUpdateWhenSameOwner()
throws LockPersistenceException,
MongockException
updateIfSameOwnerShouldUpdateWhenSameOwner in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockException@Test
public void updateIfSameOwnerShouldNotUpdateWhenDifferentOwnerAndExpiresAtIsNotGrater()
throws LockPersistenceException,
MongockException
updateIfSameOwnerShouldNotUpdateWhenDifferentOwnerAndExpiresAtIsNotGrater in interface MongoLockRepositoryITestInterfaceLockPersistenceExceptionMongockExceptionCopyright © 2023. All rights reserved.