kirklund commented on a change in pull request #6185:
URL: https://github.com/apache/geode/pull/6185#discussion_r601762847



##########
File path: 
geode-gfsh/src/test/java/org/apache/geode/management/internal/cli/result/TableBuilderTest.java
##########
@@ -0,0 +1,335 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You 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.apache.geode.management.internal.cli.result;
+
+import static java.util.Arrays.asList;
+import static org.apache.geode.internal.util.ArrayUtils.fill;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.geode.management.internal.cli.GfshParser;
+
+public class TableBuilderTest {
+
+  private static final int SCREEN_WIDTH = 40;
+
+  private Screen screen;
+  private TableBuilder tableBuilder;
+
+  @Before
+  public void setUp() {
+    screen = mock(Screen.class);
+    tableBuilder = spy(new TableBuilder());
+
+    when(screen.getScreenWidth()).thenReturn(SCREEN_WIDTH);
+    when(screen.shouldTrimColumns()).thenReturn(true);
+  }
+
+  /**
+   * Test Variations table-wide separator true false
+   */
+  @Test
+  public void testSanity() {
+    Table table = createTableStructure(3, "|", fill(new String[3], "Field"));
+    RowGroup rowGroup = table.getLastRowGroup();
+    Row row = rowGroup.newRow();
+    row
+        .newLeftCol("1")
+        .newLeftCol("1")
+        .newLeftCol("1");

Review comment:
       Yep, this is the formatting that several of us having been using with 
fluent APIs. The idea is that we think it's more easy to read and understand 
this way. I'm sure there's people who prefer it the other way too.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to