File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using AwesomeAssertions ;
23using BO4E . COM ;
34using Microsoft . VisualStudio . TestTools . UnitTesting ;
45
@@ -22,30 +23,30 @@ public void TestZeitfensterCreationFromValidString()
2223 /// Invalid string length
2324 /// </summary>
2425 [ TestMethod ]
25- [ ExpectedException ( typeof ( ArgumentException ) ) ]
2626 public void TestZeitfensterCreationFromInvalidString_Length ( )
2727 {
28- var zeitfenster = new Zeitfenster ( "090017" ) ;
28+ var instantiating = ( ) => new Zeitfenster ( "090017" ) ;
29+ instantiating . Should ( ) . Throw < ArgumentException > ( ) ;
2930 }
3031
3132 /// <summary>
3233 /// Invalid format (non-numeric)
3334 /// </summary>
3435 [ TestMethod ]
35- [ ExpectedException ( typeof ( ArgumentException ) ) ]
3636 public void TestZeitfensterCreationFromInvalidString_Format ( )
3737 {
38- var zeitfenster = new Zeitfenster ( "09XX1700" ) ;
38+ var instantiating = ( ) => new Zeitfenster ( "09XX1700" ) ;
39+ instantiating . Should ( ) . Throw < ArgumentException > ( ) ;
3940 }
4041
4142 /// <summary>
4243 /// Invalid time (hours >= 24 or minutes >= 60)
4344 /// </summary>
4445 [ TestMethod ]
45- [ ExpectedException ( typeof ( ArgumentException ) ) ]
4646 public void TestZeitfensterCreationFromInvalidString_InvalidTime ( )
4747 {
48- var zeitfenster = new Zeitfenster ( "24611700" ) ;
48+ var instantiating = ( ) => new Zeitfenster ( "24611700" ) ;
49+ instantiating . Should ( ) . Throw < ArgumentException > ( ) ;
4950 }
5051
5152 /// <summary>
You can’t perform that action at this time.
0 commit comments