File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -73,24 +73,19 @@ public void Validate_ZeroLineNumber_ThrowsValidationException()
7373 InvokeValidate ( invalidRange ) ) ;
7474
7575 Assert . IsType < ValidationMetadataException > ( exception . InnerException ) ;
76- Assert . Contains ( "Start line must be" , exception . InnerException ! . Message ) ;
77- Assert . Contains ( "Invalid value: 0" , exception . InnerException . Message ) ;
76+ Assert . Contains ( "Start line cannot be 0" , exception . InnerException ! . Message ) ;
7877 }
7978
8079
8180 [ Fact ]
82- public void Validate_NegativeLineNumber_ThrowsValidationException ( )
81+ public void Validate_NegativeSingleValue_IsValidForTailLines ( )
8382 {
84- // Arrange
85- var invalidRange = new [ ] { - 1 } ;
83+ // Arrange - negative single value means "last N lines"
84+ var validRange = new [ ] { - 10 } ;
8685
87- // Act & Assert
88- var exception = Assert . Throws < TargetInvocationException > ( ( ) =>
89- InvokeValidate ( invalidRange ) ) ;
90-
91- Assert . IsType < ValidationMetadataException > ( exception . InnerException ) ;
92- Assert . Contains ( "Start line must be" , exception . InnerException ! . Message ) ;
93- Assert . Contains ( "Invalid value: -1" , exception . InnerException . Message ) ;
86+ // Act & Assert - should not throw
87+ var exception = Record . Exception ( ( ) => InvokeValidate ( validRange ) ) ;
88+ Assert . Null ( exception ) ;
9489 }
9590
9691
You can’t perform that action at this time.
0 commit comments