7 Replies Latest reply on Jun 19, 2011 10:47 AM by davided80

    Loading a TestCase's Configuration failed

    qtrin

      For my TestCase i have define a configuration (XYZTestCase.properties). I have add them to the deployed ear with

       

      @RunWith(org.jboss.arquillian.junit.Arquillian.class)

      public class XYZTestCase {

       

          @Deployment

          public static Archive<?> createTestArchive() {

              final JavaArchive ejb = ShrinkWrap.create(JavaArchive.class, "test.jar");

              ejb.addClasses(XYZTestBeanRemote.class, XYZTestBean.class);

              File file = new File(PATH + "com/xyz/XYZTestCase.properties");

              ejb.addAsResource(file, "resources/com/xyz/XYZTestCase.properties");

              return ejb;

          }

       

          public Properties loadProperties() throws IOException {

              final ClassLoader loader = getClass().getClassLoader();

              inputStream = loader.getResourceAsStream("resources/com/xyz/XYZTestCase.properties");

              if (inputStream != null) {

                  properties.load(inputStream);

              }

              return properties;

          }

       

      In the setup phase i retrieve my configuration with loadProperties(). But the returned inputStream is null.

      Where is the mistake?

       

      Thanks