Hi,
Thanks for the prompt reply. This definitely sound interesting. I
will give it a try. Thanks !!
Boon Hui ;)
--- In csunit@yahoogroups.com, Robert Bateman <rbatemanmi@...> wrote:
>
> Why not do a parameterized test?
>
> http://www.csunit.org/documentation/2.4/parameterizedTests.html
>
> Look for the section who's title is:
>
> Parameterization With Static Method Or Property
> I think you want to use a parameterized test using the
DataSourceAttribute capability. In your case, the DataSource returned
would be the result of your Directory.GetFiles() call...
>
> Bob
>
> --- On Sun, 2/15/09, boonhuiasd <boonhui609@...> wrote:
> From: boonhuiasd <boonhui609@...>
> Subject: [csunit] Is it possible to create dynamic test?
> To: csunit@yahoogroups.com
> Date: Sunday, February 15, 2009, 10:49 PM
>
>
>
>
>
>
>
>
>
>
>
>
> Hi all,
>
>
>
> I'm wondering whether is it possible perform this using csUnit.
>
>
>
> e.g.
>
> [SetUp]
>
> public void setUp() {
>
> filePath = Directory.GetFiles( basePath, "*_ND*");
>
> .....
>
> }
>
>
>
> [Test]
>
> public void PerformTextX( )
>
> {
>
> Assert.True( ......);
>
> }
>
>
>
> Is it possible to dynamically generate the PerformTextX so i don't
>
> have to copy and paste 100s' or more (dependig on the number of files
>
> in the folder) of the same function?
>
>
>
> Or should I just use a single PerformTest and perform a loop
>
> inside to perform all the required checks?
>
>
>
> Best Regards,
>
> Boon Hui
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>