@@ -110,10 +110,10 @@ public void Constructor_BatchMode_WithEmptyJobId_GeneratesGuid()
110110 }
111111
112112 [ Fact ]
113- public void Constructor_BatchMode_WithDefaultCompletedTimeFrom_ThrowsArgumentException ( )
113+ public void Constructor_BatchMode_WithNullCompletedTimeFrom_ThrowsArgumentException ( )
114114 {
115115 // Arrange
116- DateTimeOffset from = default ;
116+ DateTimeOffset ? from = null ;
117117 DateTimeOffset to = DateTimeOffset . UtcNow ;
118118 ExportDestination destination = new ( "test-container" ) ;
119119
@@ -194,35 +194,42 @@ public void Constructor_ContinuousMode_WithValidParameters_CreatesInstance()
194194 {
195195 // Arrange
196196 ExportDestination destination = new ( "test-container" ) ;
197+ DateTimeOffset before = DateTimeOffset . UtcNow ;
197198
198199 // Act
199200 var options = new ExportJobCreationOptions (
200201 ExportMode . Continuous ,
201- default ,
202+ null ,
202203 null ,
203204 destination ) ;
204205
206+ DateTimeOffset after = DateTimeOffset . UtcNow ;
207+
205208 // Assert
206209 options . Should ( ) . NotBeNull ( ) ;
207210 options . Mode . Should ( ) . Be ( ExportMode . Continuous ) ;
208- options . CompletedTimeFrom . Should ( ) . Be ( default ) ;
211+ options . CompletedTimeFrom . Should ( ) . BeOnOrAfter ( before ) ;
212+ options . CompletedTimeFrom . Should ( ) . BeOnOrBefore ( after ) ;
209213 options . CompletedTimeTo . Should ( ) . BeNull ( ) ;
210214 options . Destination . Should ( ) . Be ( destination ) ;
211215 }
212216
213217 [ Fact ]
214- public void Constructor_ContinuousMode_WithCompletedTimeFrom_ThrowsArgumentException ( )
218+ public void Constructor_ContinuousMode_WithCompletedTimeFrom_CreatesInstance ( )
215219 {
216220 // Arrange
217221 DateTimeOffset from = DateTimeOffset . UtcNow . AddDays ( - 1 ) ;
218222 ExportDestination destination = new ( "test-container" ) ;
219223
220224 // Act
221- Action act = ( ) => new ExportJobCreationOptions ( ExportMode . Continuous , from , null , destination ) ;
225+ var options = new ExportJobCreationOptions ( ExportMode . Continuous , from , null , destination ) ;
222226
223227 // Assert
224- act . Should ( ) . Throw < ArgumentException > ( )
225- . WithMessage ( "*CompletedTimeFrom is not allowed for Continuous export mode*" ) ;
228+ options . Should ( ) . NotBeNull ( ) ;
229+ options . Mode . Should ( ) . Be ( ExportMode . Continuous ) ;
230+ options . CompletedTimeFrom . Should ( ) . Be ( from ) ;
231+ options . CompletedTimeTo . Should ( ) . BeNull ( ) ;
232+ options . Destination . Should ( ) . Be ( destination ) ;
226233 }
227234
228235 [ Fact ]
@@ -233,7 +240,7 @@ public void Constructor_ContinuousMode_WithCompletedTimeTo_ThrowsArgumentExcepti
233240 ExportDestination destination = new ( "test-container" ) ;
234241
235242 // Act
236- Action act = ( ) => new ExportJobCreationOptions ( ExportMode . Continuous , default , to , destination ) ;
243+ Action act = ( ) => new ExportJobCreationOptions ( ExportMode . Continuous , null , to , destination ) ;
237244
238245 // Assert
239246 act . Should ( ) . Throw < ArgumentException > ( )
@@ -348,7 +355,6 @@ public void Constructor_WithTerminalRuntimeStatus_CreatesInstance()
348355 OrchestrationRuntimeStatus . Completed ,
349356 OrchestrationRuntimeStatus . Failed ,
350357 OrchestrationRuntimeStatus . Terminated ,
351- OrchestrationRuntimeStatus . ContinuedAsNew ,
352358 } ;
353359
354360 // Act
@@ -385,11 +391,10 @@ public void Constructor_WithNullRuntimeStatus_UsesDefaultTerminalStatuses()
385391
386392 // Assert
387393 options . RuntimeStatus . Should ( ) . NotBeNull ( ) ;
388- options . RuntimeStatus . Should ( ) . HaveCount ( 4 ) ;
394+ options . RuntimeStatus . Should ( ) . HaveCount ( 3 ) ;
389395 options . RuntimeStatus . Should ( ) . Contain ( OrchestrationRuntimeStatus . Completed ) ;
390396 options . RuntimeStatus . Should ( ) . Contain ( OrchestrationRuntimeStatus . Failed ) ;
391397 options . RuntimeStatus . Should ( ) . Contain ( OrchestrationRuntimeStatus . Terminated ) ;
392- options . RuntimeStatus . Should ( ) . Contain ( OrchestrationRuntimeStatus . ContinuedAsNew ) ;
393398 }
394399
395400 [ Fact ]
@@ -413,7 +418,7 @@ public void Constructor_WithEmptyRuntimeStatus_UsesDefaultTerminalStatuses()
413418
414419 // Assert
415420 options . RuntimeStatus . Should ( ) . NotBeNull ( ) ;
416- options . RuntimeStatus . Should ( ) . HaveCount ( 4 ) ;
421+ options . RuntimeStatus . Should ( ) . HaveCount ( 3 ) ;
417422 }
418423
419424 [ Fact ]
0 commit comments