This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/trunk by this push:
new 9eb7b256c Improved: fixes one minor and few trivial Codenarc issues
9eb7b256c is described below
commit 9eb7b256c2a614c05534ff3799992a20575a82c1
Author: Jacques Le Roux <[email protected]>
AuthorDate: Sat Feb 7 16:19:59 2026 +0100
Improved: fixes one minor and few trivial Codenarc issues
---
.../org/apache/ofbiz/example/ExampleTests.groovy | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git
a/example/src/main/groovy/org/apache/ofbiz/example/ExampleTests.groovy
b/example/src/main/groovy/org/apache/ofbiz/example/ExampleTests.groovy
index a6059f87f..8bece6f72 100644
--- a/example/src/main/groovy/org/apache/ofbiz/example/ExampleTests.groovy
+++ b/example/src/main/groovy/org/apache/ofbiz/example/ExampleTests.groovy
@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package org.apache.ofbiz.example
import org.apache.ofbiz.entity.GenericValue
@@ -24,33 +23,35 @@ import org.apache.ofbiz.service.ServiceUtil
import org.apache.ofbiz.service.testtools.OFBizTestCase
class ExampleTests extends OFBizTestCase {
+
public ExampleTests(String name) {
super(name)
}
void testUpdateExample() {
Map<String, Object> serviceCtx = [:]
- serviceCtx.exampleId = "TestExampleUpdate"
- serviceCtx.exampleName = "Updated Test Example Name"
+ serviceCtx.exampleId = 'TestExampleUpdate'
+ serviceCtx.exampleName = 'Updated Test Example Name'
serviceCtx.userLogin = userLogin
- Map<String, Object> serviceResult =
dispatcher.runSync("updateExample", serviceCtx)
+ Map<String, Object> serviceResult =
dispatcher.runSync('updateExample', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
- GenericValue example = from("Example").where("exampleId",
"TestExampleUpdate").queryOne()
+ GenericValue example = from('Example').where('exampleId',
'TestExampleUpdate').queryOne()
assert example != null
- assert "Updated Test Example Name".equals(example.exampleName)
+ assert (Updated Test Example Name == (example.exampleName))
}
void testDeleteExample() {
Map<String, Object> serviceCtx = [:]
- serviceCtx.exampleId = "TestExampleDelete"
+ serviceCtx.exampleId = 'TestExampleDelete'
serviceCtx.userLogin = userLogin
- Map<String, Object> serviceResult =
dispatcher.runSync("deleteExample", serviceCtx)
+ Map<String, Object> serviceResult =
dispatcher.runSync('deleteExample', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
- GenericValue example = from("Example").where("exampleId",
"TestExampleDelete").queryOne()
+ GenericValue example = from('Example').where('exampleId',
'TestExampleDelete').queryOne()
assert example == null
}
+
}