Skip to content

Commit e57c58b

Browse files
committed
addded more code coverage
Signed-off-by: Neil South <[email protected]>
1 parent 8b09c91 commit e57c58b

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/WorkflowManager/Common/Services/PayloadService.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,5 @@ public Task<bool> UpdateAsyncWorkflowIds(Payload payload)
252252

253253
return _payloadRepository.UpdateAsyncWorkflowIds(payload);
254254
}
255-
256-
public Task<bool> UpdateAsync(Payload payload)
257-
{
258-
ArgumentNullException.ThrowIfNull(payload, nameof(payload));
259-
260-
return _payloadRepository.UpdateAsyncWorkflowIds(payload);
261-
}
262255
}
263256
}

tests/UnitTests/Common.Tests/Services/PayloadServiceTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,5 +488,16 @@ public async Task PayloadServiceCreate_Should_Call_GetExpiry()
488488
Assert.Equal(99, (int)daysdiff);
489489
}
490490

491+
492+
[Fact]
493+
public async Task UpdateAsync_NullPayload_ThrowsArgumentNullException()
494+
{
495+
// Arrange
496+
Payload payload = null;
497+
498+
// Act & Assert
499+
await Assert.ThrowsAsync<ArgumentNullException>(() => PayloadService.UpdateAsyncWorkflowIds(payload));
500+
}
501+
491502
}
492503
}

0 commit comments

Comments
 (0)