[hg] main-silver: minor

  • From: Tomas Stupka < >
  • To:
  • Subject: [hg] main-silver: minor
  • Date: Fri, 08 Mar 2013 06:42:28 -0800

changeset 1644cf41967a in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/1644cf41967a
description:
        minor

diffstat:

 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/ButrackingViewsTestCase.java
 |  85 ++++++++++
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/IssueTest.java 
              |   8 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/QueryTest.java 
              |   6 +-
 bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/UtilTest.java 
               |   6 +-
 4 files changed, 99 insertions(+), 6 deletions(-)

diffs (153 lines):

diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/ButrackingViewsTestCase.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/ButrackingViewsTestCase.java
new file mode 100644
--- /dev/null
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/ButrackingViewsTestCase.java
@@ -0,0 +1,85 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ * 
+ * Contributor(s):
+ * 
+ * Portions Copyrighted 2008 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.modules.bugtracking.api;
+
+import java.util.logging.Level;
+import org.junit.Test;
+import org.netbeans.junit.NbModuleSuite;
+import org.netbeans.junit.NbTestCase;
+import org.netbeans.junit.NbTestSuite;
+import org.openide.util.test.MockLookup;
+
+/**
+ *
+ * @author tomas
+ */
+public class ButrackingViewsTestCase extends NbTestCase {
+
+    public static junit.framework.Test suite() {
+        NbTestSuite suite = new NbTestSuite();
+        suite.addTestSuite(UtilTestCase.class);
+        suite.addTest(new IssueTest("_testOpen"));
+        suite.addTest(new QueryTest("_testOpen"));
+        return suite;
+    }
+
+    
+    public ButrackingViewsTestCase(String arg0) {
+        super(arg0);
+    }
+
+    @Override
+    protected Level logLevel() {
+        return Level.ALL;
+    }   
+    
+    @Override
+    protected void setUp() throws Exception {    
+        MockLookup.setLayersAndInstances();
+        APITestConnector.init();
+    }
+
+    @Override
+    protected void tearDown() throws Exception { }
+    
+}
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/IssueTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/IssueTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/IssueTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/IssueTest.java
@@ -118,11 +118,15 @@
         assertTrue(apiIssue.wasRefreshed);
     }
     
-    public void testOpen() throws InterruptedException {
+    /**
+     * invoked from BugtrackingViewsTest
+     * @throws InterruptedException 
+     */
+    public void _testOpen() throws InterruptedException {
         APITestIssue apiIssue = getAPIIssue();
         Issue issue = getIssue();
         
-        assertFalse(apiIssue.wasOpened);
+        apiIssue.wasOpened = false;
         issue.open();
         assertOpened(apiIssue);
         
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/QueryTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/QueryTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/QueryTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/QueryTest.java
@@ -128,7 +128,11 @@
         assertEquals(apiQuery.getIssues().size(), query.getIssues().size());
     }
     
-    public void testOpen() throws InterruptedException {
+    /**
+     * invoked from BugtrackingViewsTest
+     * @throws InterruptedException 
+     */
+    public void _testOpen() throws InterruptedException {
         APITestQuery apiQuery = getAPIQuery();
         Query query = getQuery();
         
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/UtilTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/UtilTestCase.java
rename from 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/UtilTest.java
rename to 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/UtilTestCase.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/UtilTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/api/UtilTestCase.java
@@ -62,9 +62,9 @@
  *
  * @author tomas
  */
-public class UtilTest extends NbTestCase {
+public class UtilTestCase extends NbTestCase {
 
-    public UtilTest(String arg0) {
+    public UtilTestCase(String arg0) {
         super(arg0);
     }
 
@@ -86,7 +86,7 @@
         APITestIssue apiIssue = getAPIIssue(APITestIssue.ID_1);
         Issue issue = getIssue(APITestIssue.ID_1);
         
-        assertFalse(apiIssue.wasOpened);
+        apiIssue.wasOpened = false;
         Util.openIssue(getRepo(), APITestIssue.ID_1);
         assertOpened(apiIssue);
         

[hg] main-silver: minor

Tomas Stupka 03/02/2013

<Possible follow-up(s)>

[hg] main-silver: minor

Tomas Stupka 03/02/2013

[hg] main-silver: minor

Tomas Stupka 03/05/2013

[hg] main-silver: minor

Tomas Stupka 03/05/2013

[hg] main-silver: minor

Tomas Stupka 03/08/2013

[hg] main-silver: minor

Tomas Stupka 03/19/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close