This is an automated email from the ASF dual-hosted git repository.
mcasters pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 1fb08c6ef9 Fix #6191 - Remove PreviewRowsDialogTest (#6192)
1fb08c6ef9 is described below
commit 1fb08c6ef9c35c46ab950d8e6597adf673f8b823
Author: Sergio Ramazzina <[email protected]>
AuthorDate: Mon Dec 15 14:27:32 2025 +0100
Fix #6191 - Remove PreviewRowsDialogTest (#6192)
---
.../hop/ui/core/dialog/PreviewRowsDialogTest.java | 64 ----------------------
1 file changed, 64 deletions(-)
diff --git
a/ui/src/test/java/org/apache/hop/ui/core/dialog/PreviewRowsDialogTest.java
b/ui/src/test/java/org/apache/hop/ui/core/dialog/PreviewRowsDialogTest.java
deleted file mode 100644
index efb47d474f..0000000000
--- a/ui/src/test/java/org/apache/hop/ui/core/dialog/PreviewRowsDialogTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.hop.ui.core.dialog;
-
-import java.util.Collections;
-import org.apache.commons.lang.SystemUtils;
-import org.apache.hop.core.row.IRowMeta;
-import org.apache.hop.core.row.IValueMeta;
-import org.apache.hop.core.variables.IVariables;
-import org.apache.hop.junit.rules.RestoreHopEngineEnvironment;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TableItem;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-public class PreviewRowsDialogTest {
- @ClassRule public static RestoreHopEngineEnvironment env = new
RestoreHopEngineEnvironment();
-
- @Before
- public void notOnWindows() {
- org.junit.Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS);
- }
-
- @Test
- public void getDataForRow() {
-
- IRowMeta iRowMeta = Mockito.mock(IRowMeta.class);
- Mockito.when(iRowMeta.size()).thenReturn(3);
- Mockito.when(iRowMeta.getValueMeta(Mockito.anyInt()))
- .thenReturn(Mockito.mock(IValueMeta.class));
-
- PreviewRowsDialog previewRowsDialog =
- new PreviewRowsDialog(
- Mockito.mock(Shell.class),
- Mockito.mock(IVariables.class),
- SWT.None,
- "test",
- iRowMeta,
- Collections.emptyList());
-
- // run without NPE
- int actualResult =
previewRowsDialog.getDataForRow(Mockito.mock(TableItem.class), null);
- Assert.assertEquals(0, actualResult);
- }
-}