You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ma...@apache.org on 2019/08/18 19:09:48 UTC

[netbeans] branch master updated: Fix tests in ide/versioning.ui module

This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b8b2c7  Fix tests in ide/versioning.ui module
     new ade329d  Merge pull request #1440 from blackleg/fix_ide_versioning_ui_tests
6b8b2c7 is described below

commit 6b8b2c7b49e802b3c5cc539edf24bfbd02f54ebd
Author: Hector Espert <he...@gmail.com>
AuthorDate: Sun Aug 18 15:50:22 2019 +0200

    Fix tests in ide/versioning.ui module
---
 .travis.yml                                        |  1 +
 ide/versioning.ui/nbproject/project.xml            |  4 +++
 .../ui/history/VCSCoreSPIHistoryTest.java          | 40 +---------------------
 .../versioning/ui/history/VCSSPIHistoryTest.java   | 40 ++--------------------
 4 files changed, 8 insertions(+), 77 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1a3634e..17ef662 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -161,6 +161,7 @@ matrix:
              ide/terminal.nb
              ide/utilities
              ide/versioning.masterfs
+             ide/versioning.ui
              ide/versioning.util
              ide/web.common
              ide/web.common.ui
diff --git a/ide/versioning.ui/nbproject/project.xml b/ide/versioning.ui/nbproject/project.xml
index 958ea6d..4aee83e 100644
--- a/ide/versioning.ui/nbproject/project.xml
+++ b/ide/versioning.ui/nbproject/project.xml
@@ -283,6 +283,10 @@
                         <compile-dependency/>
                     </test-dependency>
                     <test-dependency>
+                        <code-name-base>org.netbeans.modules.projectapi.nb</code-name-base>
+                        <compile-dependency/>
+                    </test-dependency>
+                    <test-dependency>
                         <code-name-base>org.netbeans.modules.versioning</code-name-base>
                         <compile-dependency/>
                         <test/>
diff --git a/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSCoreSPIHistoryTest.java b/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSCoreSPIHistoryTest.java
index b50111f..33a61e0 100644
--- a/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSCoreSPIHistoryTest.java
+++ b/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSCoreSPIHistoryTest.java
@@ -22,18 +22,14 @@ package org.netbeans.modules.versioning.ui.history;
 import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
-import java.util.Date;
-import javax.swing.Action;
 import org.netbeans.junit.NbTestCase;
 import org.netbeans.modules.versioning.core.api.VCSFileProxy;
-import org.netbeans.modules.versioning.core.spi.VCSHistoryProvider;
 import org.netbeans.modules.versioning.core.spi.VCSHistoryProvider.HistoryEntry;
 import org.netbeans.modules.versioning.core.util.Utils;
 import org.netbeans.modules.versioning.core.util.VCSSystemProvider;
 import org.netbeans.modules.versioning.core.util.VCSSystemProvider.VersioningSystem;
 import org.netbeans.modules.versioning.spi.testvcs.TestVCSHistoryProvider;
 import org.openide.nodes.Node;
-
 import org.openide.util.Lookup;
 import org.openide.util.test.MockLookup;
 
@@ -50,6 +46,7 @@ public class VCSCoreSPIHistoryTest extends NbTestCase {
         super(testName);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         dataRootDir = getDataDir(); 
@@ -105,39 +102,4 @@ public class VCSCoreSPIHistoryTest extends NbTestCase {
             }
         }
     }
-    
-    private class RevisionProviderImpl implements VCSHistoryProvider.RevisionProvider {
-        boolean revisionprovided = false;
-        @Override
-        public void getRevisionFile(VCSFileProxy originalFile, VCSFileProxy revisionFile) {
-            revisionprovided = true;
-        }
-    }
-    
-    private class MessageEditProviderImpl implements VCSHistoryProvider.MessageEditProvider {
-        String message;
-        @Override
-        public void setMessage(String message) throws IOException {
-            this.message = message;
-        }
-    }       
-    
-    private class ParentProviderImpl implements VCSHistoryProvider.ParentProvider {
-        static final String PARENT_MSG = "im.the.parent";
-        @Override
-        public HistoryEntry getParentEntry(VCSFileProxy file) {
-            return new HistoryEntry(
-                    new VCSFileProxy[] {file}, 
-                    new Date(System.currentTimeMillis()), 
-                    PARENT_MSG, 
-                    "user", 
-                    "username", 
-                    "12345", 
-                    "1234567890", 
-                    new Action[0], 
-                    null,
-                    null);
-}
-    }
-
 }
diff --git a/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSSPIHistoryTest.java b/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSSPIHistoryTest.java
index f341ce1..732c6b2 100644
--- a/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSSPIHistoryTest.java
+++ b/ide/versioning.ui/test/unit/src/org/netbeans/modules/versioning/ui/history/VCSSPIHistoryTest.java
@@ -22,13 +22,10 @@ package org.netbeans.modules.versioning.ui.history;
 import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
-import java.util.Date;
-import javax.swing.Action;
 import org.netbeans.junit.NbTestCase;
 import org.netbeans.modules.versioning.core.api.VCSFileProxy;
 import org.netbeans.modules.versioning.core.util.Utils;
 import org.netbeans.modules.versioning.core.util.VCSSystemProvider;
-import org.netbeans.modules.versioning.spi.VCSHistoryProvider;
 import org.netbeans.modules.versioning.core.util.VCSSystemProvider.VersioningSystem;
 import org.netbeans.modules.versioning.spi.VCSHistoryProvider.HistoryEntry;
 import org.netbeans.modules.versioning.spi.testvcs.TestVCSHistoryProvider;
@@ -49,6 +46,7 @@ public class VCSSPIHistoryTest extends NbTestCase {
         super(testName);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         dataRootDir = getDataDir(); 
@@ -102,39 +100,5 @@ public class VCSSPIHistoryTest extends NbTestCase {
                 }
             }
         }
-    }
-    
-    private class RevisionProviderImpl implements VCSHistoryProvider.RevisionProvider {
-        boolean revisionprovided = false;
-        @Override
-        public void getRevisionFile(File originalFile, File revisionFile) {
-            revisionprovided = true;
-        }
-    }
-    
-    private class ParentProviderImpl implements VCSHistoryProvider.ParentProvider {
-        static final String PARENT_MSG = "im.the.parent";
-        @Override
-        public HistoryEntry getParentEntry(File file) {
-            return new VCSHistoryProvider.HistoryEntry(
-                    new File[] {file}, 
-                    new Date(System.currentTimeMillis()), 
-                    PARENT_MSG, 
-                    "user", 
-                    "username", 
-                    "12345", 
-                    "1234567890", 
-                    new Action[0], 
-                    null,
-                    null);
-        }
-    }
-    
-    private class MessageEditProviderImpl implements VCSHistoryProvider.MessageEditProvider {
-        String message;
-        @Override
-        public void setMessage(String message) throws IOException {
-            this.message = message;
-        }
-    }       
+    }  
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists