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-framework.git

commit 43f46399ffdf144adf164da08edf5af97c8ebca7
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Sat Mar 21 23:09:05 2020 +0100

    Improved: Added unit testing, using JMockit, to ensure that form macros are
    rendered using ids from ModelFormField#getCurrentContainerId.
    
    (OFBIZ-4035)
    
    Fixes check style errors
---
 .../renderer/macro/MacroFormRendererTest.java      | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/framework/widget/src/test/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRendererTest.java
 
b/framework/widget/src/test/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRendererTest.java
index 7e63336..b89086d 100644
--- 
a/framework/widget/src/test/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRendererTest.java
+++ 
b/framework/widget/src/test/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRendererTest.java
@@ -98,17 +98,17 @@ public class MacroFormRendererTest {
                 httpSession.getAttribute("delegatorName");
                 result = "delegator";
 
-            textField.getModelFormField();
-            result = modelFormField;
+                textField.getModelFormField();
+                result = modelFormField;
 
-            modelFormField.getTooltip(withNotNull());
-            result = "";
+                modelFormField.getTooltip(withNotNull());
+                result = "";
 
-            modelFormField.getCurrentContainerId(withNotNull());
-            result = "CurrentTextId";
+                modelFormField.getCurrentContainerId(withNotNull());
+                result = "CurrentTextId";
 
-            new StringReader(withSubstring("id=\"CurrentTextId\""));
-        }};
+                new StringReader(withSubstring("id=\"CurrentTextId\""));
+            }};
 
         final MacroFormRenderer macroFormRenderer = new 
MacroFormRenderer(null, request, response);
         macroFormRenderer.renderTextField(appendable, 
ImmutableMap.of("session", httpSession), textField);
@@ -117,11 +117,11 @@ public class MacroFormRendererTest {
     @Test
     public void containerRendererUsesContainerId() throws IOException, 
TemplateException {
         new Expectations() {{
-            modelFormField.getCurrentContainerId(withNotNull());
-            result = "CurrentContainerId";
+                modelFormField.getCurrentContainerId(withNotNull());
+                result = "CurrentContainerId";
 
-            new StringReader(withSubstring("id=\"CurrentContainerId\""));
-        }};
+                new StringReader(withSubstring("id=\"CurrentContainerId\""));
+            }};
 
         final MacroFormRenderer macroFormRenderer = new 
MacroFormRenderer(null, request, response);
         macroFormRenderer.renderContainerFindField(appendable, 
ImmutableMap.of(), containerField);

Reply via email to