petermr avatar petermr committed f59588c

fixed pm bug

Comments (0)

Files changed (2)

jc-composite-core/pom.xml

 
     <parent>
         <groupId>org.xml-cml.jc</groupId>
-        <artifactId>jc-crystal</artifactId>
+        <artifactId>jc-composite</artifactId>
         <version>0.3-SNAPSHOT</version>
     </parent>
 

jc-composite-test/src/test/java/org/xmlcml/cml/converters/composite/registry/CompositeConverterRegistryTest.java

 	String FOO = "chemical/x-foo";
 	TypePair PAIR_OK  = new TypePair(FOO, CML);
 	TypePair PAIR_MISSING  = new TypePair(FOO, CIF);
-	private static int SIZE = 5;
+	private static int TYPE_SIZE = 2;
+	private static int CONVERTER_SIZE = 2;
+	
 
     @Test
     public void testMap() {
     	Map<TypePair, List<Converter>> map = ConverterRegistry.getDefaultConverterRegistry().getMap();
     	Assert.assertNotNull(map);
     	// size will change as more are added
-    	Assert.assertEquals(SIZE, map.size());
+    	Assert.assertEquals(TYPE_SIZE, map.size());
     }
 
     @Test
     public void testList() {
     	List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
     	Assert.assertNotNull(converterList);
-    	Assert.assertEquals(SIZE, converterList.size());
+    	Assert.assertEquals(CONVERTER_SIZE, converterList.size());
     }
 
     @Test
     public void testFindConverter() {
     	List<Converter> converters = ConverterRegistry.getDefaultConverterRegistry().findConverters(
     			ChemdrawModule.CDX_TYPE.getMimeType(), CMLCommon.CML_TYPE.getMimeType());
-    	Assert.assertNotNull("amber", converters);
+    	Assert.assertNotNull("compos", converters);
     	for (Converter converter : converters) {
     		System.out.println("Converter: "+converter);
     	}
-    	Assert.assertEquals("amber", 1, converters.size());
-    	Assert.assertEquals("amber", "org.xmlcml.cml.converters.compchem.amber.in.AmberFF2XMLConverter", converters.get(0).getClass().getName());
+    	Assert.assertEquals("compos", 1, converters.size());
+    	Assert.assertEquals("compos", "org.xmlcml.cml.converters.compchem.composite.chemdraw.CDX2CMLConverter", converters.get(0).getClass().getName());
     }
 
     @Test
 //    	for (Converter converter : converters) {
 //    		System.out.println(converter);
 //    	}
-    	Assert.assertEquals("cml", 2, converters.size());
+    	Assert.assertEquals("cml", 1, converters.size());
     }
 
 	@Test
 		ConverterRegistry converterRegistry = ConverterRegistry.getDefaultConverterRegistry();
 		List<Converter> converterList = converterRegistry.getConverterList();
 		Assert.assertNotNull(converterList);
-		Assert.assertEquals("converterList", SIZE, converterList.size());
+		Assert.assertEquals("converterList", CONVERTER_SIZE, converterList.size());
 	}
 
 	@Test
 	public void testSingletonConverterRegistryList() {
 		List<Converter> converterList = ConverterRegistry.getDefaultConverterRegistry().getConverterList();
 		Assert.assertNotNull(converterList);
-		Assert.assertEquals("converterList", SIZE, converterList.size());
+		Assert.assertEquals("converterList", CONVERTER_SIZE, converterList.size());
 	}
 
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.