@@ -85,18 +85,16 @@ public void FindPercentComplete_KeyIsNull_ThrowsArgumentNullException()
8585 // Arrange
8686
8787 // Act
88+ string ? percent = GetSiteMap ( ) . FindPercentComplete ( null ! ) ;
8889
8990 // Assert
90- Assert . Throws < ArgumentNullException > ( ( ) =>
91- {
92- GetSiteMap ( ) . FindPercentComplete ( null ! ) ;
93- } ) ;
91+ Assert . Null ( percent ) ;
9492 }
9593
9694 [ Theory ]
9795 [ InlineData ( " " ) ]
9896 [ InlineData ( "" ) ]
99- public void FindPercentComplete_KeyIsWhiteSpace_ThrowsArgumentException ( string key )
97+ public void FindPercentComplete_KeyIsWhiteSpace_ThrowsArgumentException ( string ? key )
10098 {
10199 // Arrange
102100
@@ -112,12 +110,12 @@ public void FindPercentComplete_KeyIsWhiteSpace_ThrowsArgumentException(string k
112110 [ Theory ]
113111 [ InlineData ( "hello-world" , "50.00" ) ]
114112 [ InlineData ( "c-syntax-fundamentals" , "100.00" ) ]
115- public void FindPercentComplete_ValidKey_Success ( string key , string result )
113+ public void FindPercentComplete_ValidKey_Success ( string ? key , string result )
116114 {
117115 // Arrange
118116
119117 // Act
120- string percent = GetSiteMap ( ) . FindPercentComplete ( key ) ;
118+ string ? percent = GetSiteMap ( ) . FindPercentComplete ( key ) ;
121119
122120 // Assert
123121 Assert . Equal ( result , percent ) ;
@@ -130,7 +128,7 @@ public void FindPercentComplete_EmptySiteMappings_ReturnsZeroPercent()
130128 IList < SiteMapping > siteMappings = new List < SiteMapping > ( ) ;
131129
132130 // Act
133- string percent = siteMappings . FindPercentComplete ( "test" ) ;
131+ string ? percent = siteMappings . FindPercentComplete ( "test" ) ;
134132
135133 // Assert
136134 Assert . Equal ( "0.00" , percent ) ;
0 commit comments