vrakeshreddy / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Ambiguity when Decorating a Test case with both ExpectedArgumentNullException and ExpectedArgumentOutOfRangeException #563

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. write a test that throws ArgumentOutOfRangeException and decorate it
with all the ExpectException*** attributes
 ExpectedArgumentNullException 
ExpectedArgumentOutOfRangeException
ExpectedArgumentException
2. run the test
3. the test fails

What is the expected output? What do you see instead?
I would like a compilation error.
instead it compiles and runs and only the first attribute is actually used

What version of the product are you using? On what operating system?
3.1.354

Please provide any additional information below.
I realize this might not be smart usage of the attributes,
but I still think a compilation error would be nice 

Original issue reported on code.google.com by niklas.d...@gmail.com on 15 Oct 2009 at 7:31

GoogleCodeExporter commented 9 years ago
It is not possible to produce a compilation error due to the limitations of the 
C#
language.  So the best we can do is issue a runtime error or test annotation of 
some
kind should we detect the ambiguity.

Original comment by jeff.br...@gmail.com on 23 Oct 2009 at 6:17

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 17 Jul 2010 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 14 Sep 2010 at 1:54

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 14 Jun 2011 at 5:53