<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.18.3">
</HEAD>
<BODY>
Sure - I keep that requirement in mind.<BR>
What's hardcoded now will be default value, yet configurable.<BR>
<BR>
Ondra<BR>
<BR>
<BR>
<BR>
Jaikiran Pai píše v Po 07. 11. 2011 v 13:58 +0530:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Monday 07 November 2011 01:54 PM, Ondřej Žižka wrote:
> Please don't hardcode paths in tests.
> Remember that tests may be shuffled around.
> I'll introduce a new system properties, pointing to the testsuite dir,
> evt. to project's root dir.
Just a FYI - Some of the developers use the IDE to run the tests (I
don't). So if you introduce these system properties, this should not
force the IDE users to have to set the system properties for these tests
to be able to run them, IMO.
-Jaikiran
>
> Also please remember that the testsuite will run agains productized
> build -
> perhaps the following tests could use XSD's from src/main/resources
> instead?
> (QA will run against provided EAP, let's not force them to run whole
> build.)
>
> Thanks,
> Ondra
>
>
>
> public class AbstractValidationUnitTest {
> private static final Map<String, File> JBOSS_SCHEMAS = new
> HashMap<String, File>();
> private static Map<String, String> NAMESPACE_MAP = new
> HashMap<String, String>();
> static final File MOD_DIR = new File(System.getProperty("user.dir"));
> static final File TARGET_DIR = new File(MOD_DIR,
> "../../build/target/");
> private static File BASE_DIR = null;
>
> static {
>
> NAMESPACE_MAP.put("<A HREF="http://java.sun.com/xml/ns/javaee/javaee_6.xsd">http://java.sun.com/xml/ns/javaee/javaee_6.xsd</A>",
> "schema/javaee_6.xsd");
> NAMESPACE_MAP.put("<A HREF="http://www.w3.org/2001/xml.xsd">http://www.w3.org/2001/xml.xsd</A>",
> "schema/xml.xsd");
> final File[] children = TARGET_DIR.listFiles();
> if (children != null) {
> for (File child : children) {
> if (child.getName().startsWith("jboss-")) {
> BASE_DIR = child;
> break;
> }
> }
> if (BASE_DIR != null) {
> final File schemaDir = new File(BASE_DIR, "docs/schema");
> final File[] xsds =
> schemaDir.listFiles(SchemaFilter.FILTER);
> for (File xsd : xsds) {
> JBOSS_SCHEMAS.put(xsd.getName(), xsd);
> }
> }
> }
> }
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> <A HREF="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</A>
> <A HREF="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</A>
_______________________________________________
jboss-as7-dev mailing list
<A HREF="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</A>
<A HREF="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>