On the fixture class. But it should also work on the constructor as well as on the constructor parameter. It can also be used on fields and properties as well as individual test methods!
Jeff. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of max2256 Sent: Monday, February 02, 2009 5:26 AM To: MbUnit.User Subject: MbUnit Re: CsvData problem What do you mean by putting it on the type? On Jan 31, 4:03 pm, Jeff Brown <[email protected]> wrote: > That's a bug. We should be able to apply the attribute to the > constructor. However, try putting it on the type instead. > > On Jan 29, 2009, at 2:35 PM, max2256 <[email protected]> wrote: > > > > > Hi > > > I have the following values in my csv file > > > firstName,LastName,age > > Jim,Morrison,40 > > Pat,King,25 > > > Now let's say I want to use the CsvData attribute this way: > > > public class PersonTest > > { > > private Person p; > > > [CsvData(FilePath = "Persons.csv", HasHeader = true)] > > public PersonTest( string fName, string lName, int age ) > > { > > p = new Person(fName,lName,age); > > } > > } > > > I've noticed that it is not possible to use le CsvData attribute at > > the constructor level, the only way of achieving this is with the > > following : > > > public PersonTest( [CsvData(FilePath = "Persons.csv", HasHeader = > > true)] string fName, string lName, int age ) > > > My question is how can I get the lName and age value if I only put > > the CsvData attribute only on the first parameter ? > > > Thanx --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
