// BridgeDb,
// An abstraction layer for identifier mapping services, both local and online.
// Copyright 2006-2009 BridgeDb developers
// Copyright 2012-2103 Christian Brenninkmeijer
//
// Licensed 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.bridgedb;

import java.util.HashSet;
import java.util.Iterator;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Christian
 */
@Ignore
public abstract class XrefIteratorTest extends IDMapperTestBase{
    //Must be set by supclasses.
    protected static XrefIterator XrefIterator;
    
    @Test
    public void TestAllDataSourcesIterator() throws IDMapperException{
        report("TestAllDataSourcesIterator");
        Iterable<Xref> iterable = XrefIterator.getIterator();
        Iterator<Xref> iterator = iterable.iterator();
        HashSet<Xref> asSet = new HashSet<Xref>();
        while (iterator.hasNext()){
            asSet.add(iterator.next());
        }
        assertTrue(asSet.contains(map1xref1));
        assertTrue(asSet.contains(map1xref3));
        assertTrue(asSet.contains(map2xref2));
        assertTrue(asSet.contains(map3xref3));
        assertFalse(asSet.contains(mapBadxref1));
        assertFalse(asSet.contains(mapBadxref2));
        assertFalse(asSet.contains(mapBadxref3));
    }

    @Test
    public void TestOneDataSourcesIterator() throws IDMapperException{
        report("TestOneDataSourcesIterator");
        Iterable<Xref> iterable = XrefIterator.getIterator(DataSource2);
        Iterator<Xref> iterator = iterable.iterator();
        HashSet<Xref> asSet = new HashSet<Xref>();
        while (iterator.hasNext()){
            asSet.add(iterator.next());
        }
        assertFalse(asSet.contains(map1xref1));
        assertFalse(asSet.contains(map1xref3));
        assertTrue(asSet.contains(map1xref2));
        assertTrue(asSet.contains(map2xref2));
        assertTrue(asSet.contains(map3xref2));
        assertFalse(asSet.contains(map3xref1));
        assertFalse(asSet.contains(map3xref3));
        assertFalse(asSet.contains(mapBadxref1));
        assertFalse(asSet.contains(mapBadxref2));
        assertFalse(asSet.contains(mapBadxref3));
    }

}

@@ -1,11 +1,13 @@
 /
-/ 
+*%0A *
 BridgeDb
@@ -8,19 +8,18 @@
 idgeDb,%0A
-//
  
+*
 An abstr
@@ -87,19 +87,18 @@
 online.%0A
-//
  
+*
 Copyrigh
@@ -102,14 +102,20 @@
 ight
+ (c)
  2006
--
+ - 
 2009
@@ -124,17 +124,17 @@
 ridgeDb 
-d
+D
 eveloper
@@ -135,19 +135,18 @@
 elopers%0A
-//
  
+*
 Copyrigh
@@ -151,16 +151,22 @@
 ght 
-2012-210
+(c) 2012 - 201
 3 Ch
@@ -188,22 +188,21 @@
 kmeijer%0A
-//%0A// 
+ *%0A *
 Licensed
@@ -257,19 +257,18 @@
 ense%22);%0A
-//
  
+*
 you may 
@@ -324,19 +324,18 @@
 icense.%0A
-//
  
+*
 You may 
@@ -365,22 +365,16 @@
 cense at
-%0A//%0A//
  http://
@@ -413,14 +413,13 @@
 2.0%0A
-//%0A// 
+ *%0A *
 Unle
@@ -481,19 +481,16 @@
 software
-%0A//
  distrib
@@ -548,19 +548,18 @@
  BASIS,%0A
-//
  
+*
 WITHOUT 
@@ -623,19 +623,18 @@
 mplied.%0A
-//
  
+*
 See the 
@@ -692,19 +692,16 @@
 ions and
-%0A//
  limitat
@@ -724,17 +724,18 @@
 icense.%0A
-/
+ *
 /%0Apackag
@@ -821,22 +821,36 @@
 g.junit.
-Ignore
+jupiter.api.Disabled
 ;%0Aimport
@@ -864,14 +864,27 @@
 nit.
+jupiter.api.
 Test;%0A
+%0A
 impo
@@ -951,14 +951,16 @@
 */%0A@
-Ignore
+Disabled
 %0Apub
@@ -2714,11 +2714,10 @@
 ;%0A    %7D%0A
-%0A
 %7D%0A

Update XrefIteratorTest.java