DATAMONGO-2206 - Polishing.
Reformat code. Convert spaces to tabs. Use mockk version property to define mockk version. Author tags. Original pull request: #646.
This commit is contained in:
@@ -279,12 +279,12 @@
|
||||
<version>${kotlin}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.mockk</groupId>
|
||||
<artifactId>mockk</artifactId>
|
||||
<version>1.9.1</version>
|
||||
<version>${mockk}</version>
|
||||
<scope>test</scope>
|
||||
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -26,51 +26,51 @@ import org.junit.Test
|
||||
*/
|
||||
class ExecutableFindOperationExtensionsTests {
|
||||
|
||||
val operation = mockk<ExecutableFindOperation>(relaxed = true)
|
||||
val operation = mockk<ExecutableFindOperation>(relaxed = true)
|
||||
|
||||
val operationWithProjection = mockk<ExecutableFindOperation.FindWithProjection<First>>(relaxed = true)
|
||||
val operationWithProjection = mockk<ExecutableFindOperation.FindWithProjection<First>>(relaxed = true)
|
||||
|
||||
val distinctWithProjection = mockk<ExecutableFindOperation.DistinctWithProjection>(relaxed = true)
|
||||
val distinctWithProjection = mockk<ExecutableFindOperation.DistinctWithProjection>(relaxed = true)
|
||||
|
||||
@Test // DATAMONGO-1689
|
||||
fun `ExecutableFindOperation#query(KClass) extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689
|
||||
fun `ExecutableFindOperation#query(KClass) extension should call its Java counterpart`() {
|
||||
|
||||
operation.query(First::class)
|
||||
verify { operation.query(First::class.java) }
|
||||
}
|
||||
operation.query(First::class)
|
||||
verify { operation.query(First::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1689
|
||||
fun `ExecutableFindOperation#query() with reified type parameter extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689
|
||||
fun `ExecutableFindOperation#query() with reified type parameter extension should call its Java counterpart`() {
|
||||
|
||||
operation.query<First>()
|
||||
verify { operation.query(First::class.java) }
|
||||
}
|
||||
operation.query<First>()
|
||||
verify { operation.query(First::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1689, DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#FindOperationWithProjection#asType(KClass) extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689, DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#FindOperationWithProjection#asType(KClass) extension should call its Java counterpart`() {
|
||||
|
||||
operationWithProjection.asType(User::class)
|
||||
verify { operationWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
operationWithProjection.asType(User::class)
|
||||
verify { operationWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1689, DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#FindOperationWithProjection#asType() with reified type parameter extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689, DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#FindOperationWithProjection#asType() with reified type parameter extension should call its Java counterpart`() {
|
||||
|
||||
operationWithProjection.asType<User>()
|
||||
verify { operationWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
operationWithProjection.asType<User>()
|
||||
verify { operationWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1761, DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#DistinctWithProjection#asType(KClass) extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1761, DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#DistinctWithProjection#asType(KClass) extension should call its Java counterpart`() {
|
||||
|
||||
distinctWithProjection.asType(User::class)
|
||||
verify { distinctWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
distinctWithProjection.asType(User::class)
|
||||
verify { distinctWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#DistinctWithProjection#asType() with reified type parameter extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-2086
|
||||
fun `ExecutableFindOperation#DistinctWithProjection#asType() with reified type parameter extension should call its Java counterpart`() {
|
||||
|
||||
distinctWithProjection.asType<User>()
|
||||
verify { distinctWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
distinctWithProjection.asType<User>()
|
||||
verify { distinctWithProjection.`as`(User::class.java) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,20 +26,20 @@ import org.junit.Test
|
||||
*/
|
||||
class ExecutableInsertOperationExtensionsTests {
|
||||
|
||||
val operation = mockk<ExecutableInsertOperation>(relaxed = true)
|
||||
val operation = mockk<ExecutableInsertOperation>(relaxed = true)
|
||||
|
||||
@Test // DATAMONGO-1689
|
||||
fun `insert(KClass) extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689
|
||||
fun `insert(KClass) extension should call its Java counterpart`() {
|
||||
|
||||
operation.insert(First::class)
|
||||
verify { operation.insert(First::class.java) }
|
||||
}
|
||||
operation.insert(First::class)
|
||||
verify { operation.insert(First::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1689
|
||||
fun `insert() with reified type parameter extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689
|
||||
fun `insert() with reified type parameter extension should call its Java counterpart`() {
|
||||
|
||||
operation.insert<First>()
|
||||
verify { operation.insert(First::class.java) }
|
||||
}
|
||||
operation.insert<First>()
|
||||
verify { operation.insert(First::class.java) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.junit.Test
|
||||
|
||||
/**
|
||||
* @author Christoph Strobl
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ExecutableMapReduceOperationExtensionsTests {
|
||||
|
||||
|
||||
@@ -26,20 +26,20 @@ import org.junit.Test
|
||||
*/
|
||||
class ExecutableRemoveOperationExtensionsTests {
|
||||
|
||||
val operation = mockk<ExecutableRemoveOperation>(relaxed = true)
|
||||
val operation = mockk<ExecutableRemoveOperation>(relaxed = true)
|
||||
|
||||
@Test // DATAMONGO-1689
|
||||
fun `remove(KClass) extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689
|
||||
fun `remove(KClass) extension should call its Java counterpart`() {
|
||||
|
||||
operation.remove(First::class)
|
||||
verify { operation.remove(First::class.java) }
|
||||
}
|
||||
operation.remove(First::class)
|
||||
verify { operation.remove(First::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1689
|
||||
fun `remove() with reified type parameter extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1689
|
||||
fun `remove() with reified type parameter extension should call its Java counterpart`() {
|
||||
|
||||
operation.remove<First>()
|
||||
verify { operation.remove(First::class.java) }
|
||||
}
|
||||
operation.remove<First>()
|
||||
verify { operation.remove(First::class.java) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.junit.Test
|
||||
* Unit tests for `ExecutableUpdateOperationExtensions.kt`.
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ExecutableUpdateOperationExtensionsTests {
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ class MongoOperationsExtensionsTests {
|
||||
fun `indexOps() with reified type parameter extension should call its Java counterpart`() {
|
||||
|
||||
operations.indexOps<First>()
|
||||
verify { operations .indexOps(First::class.java) }
|
||||
verify { operations.indexOps(First::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1689
|
||||
@@ -716,7 +716,7 @@ class MongoOperationsExtensionsTests {
|
||||
operations.findDistinct<String, First>(query, "field", "collection")
|
||||
verify { operations.findDistinct(query, "field", "collection", First::class.java, String::class.java) }
|
||||
}
|
||||
|
||||
|
||||
@Test // DATAMONGO-1761
|
||||
fun `findDistinct(Query, String, KClass) should call java counterpart`() {
|
||||
|
||||
|
||||
@@ -22,23 +22,24 @@ import org.junit.Test
|
||||
|
||||
/**
|
||||
* @author Mark Paluch
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ReactiveAggregationOperationExtensionsTests {
|
||||
|
||||
val operation = mockk<ReactiveAggregationOperation>(relaxed = true)
|
||||
val operation = mockk<ReactiveAggregationOperation>(relaxed = true)
|
||||
|
||||
@Test // DATAMONGO-1719
|
||||
fun `aggregateAndReturn(KClass) extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1719
|
||||
fun `aggregateAndReturn(KClass) extension should call its Java counterpart`() {
|
||||
|
||||
operation.aggregateAndReturn(First::class)
|
||||
verify { operation.aggregateAndReturn(First::class.java) }
|
||||
}
|
||||
operation.aggregateAndReturn(First::class)
|
||||
verify { operation.aggregateAndReturn(First::class.java) }
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1719
|
||||
fun `aggregateAndReturn() with reified type parameter extension should call its Java counterpart`() {
|
||||
@Test // DATAMONGO-1719
|
||||
fun `aggregateAndReturn() with reified type parameter extension should call its Java counterpart`() {
|
||||
|
||||
operation.aggregateAndReturn<First>()
|
||||
verify { operation.aggregateAndReturn(First::class.java) }
|
||||
}
|
||||
operation.aggregateAndReturn<First>()
|
||||
verify { operation.aggregateAndReturn(First::class.java) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.junit.Test
|
||||
|
||||
/**
|
||||
* @author Mark Paluch
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ReactiveFindOperationExtensionsTests {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.junit.Test
|
||||
|
||||
/**
|
||||
* @author Mark Paluch
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ReactiveInsertOperationExtensionsTests {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.junit.Test
|
||||
|
||||
/**
|
||||
* @author Christoph Strobl
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ReactiveMapReduceOperationExtensionsTests {
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@ class ReactiveMongoOperationsExtensionsTests {
|
||||
verify { operations.findDistinct(query, "field", "collection", First::class.java, String::class.java) }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test // DATAMONGO-1761
|
||||
fun `findDistinct(Query, String, KClass) should call java counterpart`() {
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.junit.Test
|
||||
|
||||
/**
|
||||
* @author Mark Paluch
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ReactiveRemoveOperationExtensionsTests {
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.junit.Test
|
||||
* Unit tests for `ReactiveExecutableUpdateOperationExtensions.kt`.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @author Sebastien Deleuze
|
||||
*/
|
||||
class ReactiveUpdateOperationExtensionsTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user