1 /* 2 * $Id: SpiUtilsTestCase.java 8077 2007-08-27 20:15:25Z aperepel $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com 5 * 6 * The software in this package is published under the terms of the CPAL v1.0 7 * license, a copy of which has been included with this distribution in the 8 * LICENSE.txt file. 9 */ 10 11 package org.mule.util; 12 13 import org.mule.tck.AbstractMuleTestCase; 14 15 public class SpiUtilsTestCase extends AbstractMuleTestCase 16 { 17 18 public void testThisIsJustAnEmptyPlaceholder() { 19 // needed to avoid triggering false TestSuite failures with no test methods. 20 } 21 22 // public void testDiscoverDefault() throws Exception 23 // { 24 // Class c = SpiUtils.findService(Fruit.class, Banana.class.getName(), getClass()); 25 // assertNotNull(c); 26 // assertEquals(Banana.class.getName(), c.getName()); 27 // } 28 // 29 // public void testDiscoverNotFound() throws Exception 30 // { 31 // Class c = SpiUtils.findService(Fruit.class, getClass()); 32 // assertNull(c); 33 // } 34 // 35 // public void testDiscoverFromProperty() throws Exception 36 // { 37 // System.setProperty(Fruit.class.getName(), Apple.class.getName()); 38 // Class c = SpiUtils.findService(Fruit.class, getClass()); 39 // assertNotNull(c); 40 // assertEquals(Apple.class.getName(), c.getName()); 41 // Properties p = System.getProperties(); 42 // p.remove(Fruit.class.getName()); 43 // System.setProperties(p); 44 // } 45 // 46 // public void testDiscoverFromPropertyFile() throws Exception 47 // { 48 // InputStream is = IOUtils.getResourceAsStream("test-spi.properties", getClass()); 49 // assertNotNull("Test resource not found.", is); 50 // Properties p = new Properties(); 51 // p.load(is); 52 // assertNotNull(p); 53 // Class c = SpiUtils.findService(Fruit.class, p, getClass()); 54 // assertNotNull(c); 55 // assertEquals(Banana.class.getName(), c.getName()); 56 // } 57 // 58 // public void testDiscoverFromResource() throws Exception 59 // { 60 // Class c = SpiUtils.findService(Fruit.class, "test-spi.properties", Apple.class.getName(), getClass()); 61 // assertNotNull(c); 62 // assertEquals(Banana.class.getName(), c.getName()); 63 // } 64 65 }