Hi Thanks for the info. I used FilePath and it worked. However i came across another problem I would like to keep the csv file where test dll is kept. Os when i try to point the path of csv like this it get error
[Test, CsvData(FilePath = AppDomain.CurrentDomain.BaseDirectory+"\ \Objects.csv")] what would be best way to do this. Thanks TK On May 27, 5:16 pm, Yann Trevin <[email protected]> wrote: > The *ResourcePath *specifies the location of the data file as an "embedded > resource" (a resource directly included inside your output assembly) > You need to use *FilePath *instead, which specifies the path of an external > resource in the file system. > > See here for > details:http://gallio.org/wiki/doku.php?id=mbunit:data_driven_testing:externa... > <http://gallio.org/wiki/doku.php?id=mbunit:data_driven_testing:externa...> > Regards, > Yann. > > 2011/5/27 tk <[email protected]> > > > > > Hi > > > I am trying to data drive from csv file but i seem to be getting > > error. I know is some simple thing missing. It does not seem to be > > able to find the csv file. It would be great if you point me in the > > right direction. > > > [Test, CsvData(ResourcePath="D:\\Objects.csv")] > > public void Test(string test) > > { > > TestLog.WriteLine(test); > > > // > > // TODO: Add test logic here > > // > > } > > > Error Message > > Gallio.Framework.Pattern.PatternUsageErrorException: > > [ContentEmbeddedResource] - Could not find manifest resource 'D: > > \Objects.csv'. > > at Gallio.Common.IO.ContentEmbeddedResource.OpenStream() in c: > > \Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\IO > > \ContentEmbeddedResource.cs:line 70 > > at Gallio.Common.IO.ContentEmbeddedResource.OpenTextReader() in c: > > \Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\IO > > \ContentEmbeddedResource.cs:line 79 > > at Gallio.Framework.Data.CsvDataSet.<GetItemsImpl>d__0.MoveNext() > > in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Data > > \CsvDataSet.cs:line 141 > > at > > Gallio.Framework.Data.ConcatenationMergeStrategy.<Merge>d__0.MoveNext() > > in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Data > > \ConcatenationMergeStrategy.cs:line 42 > > at > > Gallio.Framework.Data.CombinatorialJoinStrategy.<Join>d__0.MoveNext() > > in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Data > > \CombinatorialJoinStrategy.cs:line 56 > > at > > Gallio.Framework.Data.JoinedDataSet.<GetItemsImpl>d__0.MoveNext() in c: > > \Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Data > > \JoinedDataSet.cs:line 148 > > at > > Gallio.Framework.Data.DataBindingContext.<GetItems>d__0.MoveNext() in > > c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Data > > \DataBindingContext.cs:line 188 > > > -- > > 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?hl=en. -- 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?hl=en.
