On 5/18/06, Ranji <[EMAIL PROTECTED]> wrote:
Hello Folks -
I am attempting to use the "DataFixture" attribute - specifically I am
having problem with the string resource I specify for the XML file in
the XmlDataProvider attribute. If I use a constant _expression_ for the
first argument, MbUnit is able to parse the specified XML file resource
and spit out the test cases. Unfortunately, these tests are designed to
be run on the build machine (and possibly other machines) where the
path of the XML resource is not absolute - it can be located (and found
in a fixed location) relative to the application home directory. So in
effect if I tried this -
class UnitTestSuite
{
public static readonly String OSP_HOME = FindHomeDirectory();
public static readonly String REG_PATH = OSP_HOME + some string;
public static readonly String XML_FILE = REG_PATH + "test.xml";
....
}
If I used UnitTestSuite.XML_FILE as the first argument to the
XmlDataProvider() attribute, I receive the following error messge -
"An attribute argument must be a constant _expression_, typeof _expression_
or array creation _expression_"
Is there any way I can circumvent this problem by not using a constant
_expression_? Would like to avoid it at all costs - would really be my
last resort though.
Cheers
Ranji
--
Jay Flowers
----------------------------------------------------------------------
http://jayflowers.com
---------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/MbUnitUser
-~----------~----~----~----~------~----~------~--~---
