DATAMONGO-1748 - Polishing.

Added missing license headers, formatting.

Original pull request: #473.
This commit is contained in:
Oliver Gierke
2017-07-20 13:08:16 +02:00
parent e6bae5d124
commit 7258cb8d1d
6 changed files with 96 additions and 5 deletions

View File

@@ -1,3 +1,18 @@
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mongodb.core.query
/**

View File

@@ -1,3 +1,18 @@
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mongodb.core
import example.first.First
@@ -28,5 +43,4 @@ class ExecutableAggregationOperationExtensionsTests {
operation.aggregateAndReturn<First>()
Mockito.verify(operation, Mockito.times(1)).aggregateAndReturn(First::class.java)
}
}

View File

@@ -1,3 +1,18 @@
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mongodb.core
import example.first.First
@@ -43,5 +58,4 @@ class ExecutableFindOperationExtensionsTests {
operationWithProjection.asType()
Mockito.verify(operationWithProjection, Mockito.times(1)).`as`(First::class.java)
}
}

View File

@@ -1,3 +1,18 @@
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mongodb.core
import example.first.First
@@ -28,5 +43,4 @@ class ExecutableInsertOperationExtensionsTests {
operation.insert<First>()
Mockito.verify(operation, Mockito.times(1)).insert(First::class.java)
}
}

View File

@@ -1,3 +1,18 @@
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mongodb.core
import example.first.First
@@ -28,5 +43,4 @@ class ExecutableRemoveOperationExtensionsTests {
operation.remove<First>()
Mockito.verify(operation, Mockito.times(1)).remove(First::class.java)
}
}

View File

@@ -1,3 +1,18 @@
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mongodb.core.query
import org.junit.Test
@@ -18,17 +33,22 @@ class CriteriaExtensionsTests {
@Test
fun `isEqualTo() extension should call its Java counterpart`() {
val foo = "foo"
criteria.isEqualTo(foo)
Mockito.verify(criteria, Mockito.times(1)).`is`(foo)
}
@Test
fun `inValues() extension should call its Java counterpart`() {
val foo = "foo"
val bar = "bar"
criteria.inValues(foo, bar)
Mockito.verify(criteria, Mockito.times(1)).`in`(foo, bar)
}
}