Tutorial Exercices Error ?

Jul 27, 2008 at 1:55 AM
I try to exercices ... and I got errors "     "Event"     "could not generate any test in 100 runs"


Part 2: Creating a Parameterized Unit Test
1. In the HelloWorldTest, add a new public instance method Parameterized-
Test that takes an int parameter. Mark this method with the PexMethod-
Attribute, written as [PexMethod] in C#.
[PexMethod]
public void ParameterizedTest(int i) {
if (i == 123)
throw new ArgumentException("i");
}
Coordinator
Aug 6, 2008 at 7:04 PM

I think the tutorial is incorrect. The PUT should look like

 

 

// 4.3 Part 2

 

 

 

 

 

[

PexMethod]

 

[

PexAllowedException(typeof(ArgumentException))]

 

 

public void ParametereizedTest ( int i )

 

{

 

if ( i == 123 )

 

{

 

throw new ArgumentException ( "i" );

 

}

}

 

 

 

I will pass this along to the Pex folks.