File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
test/AzureOpenAIProxy.ApiApp.Tests Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public void Given_Null_StorageAccountSettings_When_Creating_AdminEventRepository
5858 }
5959
6060 [ Fact ]
61- public async Task Given_Instance_When_CreateEvent_Invoked_Then_It_Should_Not_Throw_Exception ( )
61+ public async Task Given_Instance_When_CreateEvent_Invoked_Then_It_Should_Return_Passed_Argument ( )
6262 {
6363 // Arrange
6464 var settings = Substitute . For < StorageAccountSettings > ( ) ;
@@ -70,11 +70,11 @@ public async Task Given_Instance_When_CreateEvent_Invoked_Then_It_Should_Not_Thr
7070 var eventDetails = new AdminEventDetails ( ) ;
7171 var repository = new AdminEventRepository ( tableServiceClient , settings ) ;
7272
73- // Act
74- Func < Task > func = ( ) => repository . CreateEvent ( eventDetails ) ;
73+ // Act
74+ var result = await repository . CreateEvent ( eventDetails ) ;
7575
7676 // Assert
77- await func . Should ( ) . NotThrowAsync < InvalidOperationException > ( ) ;
77+ result . Should ( ) . BeEquivalentTo ( eventDetails ) ;
7878 }
7979
8080 [ Fact ]
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public void Given_ServiceCollection_When_AddAdminEventService_Invoked_Then_It_Sh
3131 }
3232
3333 [ Fact ]
34- public async Task Given_Instance_When_CreateEvent_Invoked_Then_It_Should_Not_Throw_Exception ( )
34+ public async Task Given_Instance_When_CreateEvent_Invoked_Then_It_Should_Return_Passed_Argument ( )
3535 {
3636 // Arrange
3737 var eventDetails = new AdminEventDetails ( ) ;
@@ -42,10 +42,10 @@ public async Task Given_Instance_When_CreateEvent_Invoked_Then_It_Should_Not_Thr
4242 repository . CreateEvent ( Arg . Any < AdminEventDetails > ( ) ) . Returns ( eventDetails ) ;
4343
4444 // Act
45- Func < Task > func = ( ) => service . CreateEvent ( eventDetails ) ;
45+ var result = await service . CreateEvent ( eventDetails ) ;
4646
4747 // Assert
48- await func . Should ( ) . NotThrowAsync < InvalidOperationException > ( ) ;
48+ result . Should ( ) . BeEquivalentTo ( eventDetails ) ;
4949 }
5050
5151 [ Fact ]
You can’t perform that action at this time.
0 commit comments