File tree 3 files changed +24
-3
lines changed
3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 36
36
run : dotnet build --configuration Release --no-restore
37
37
38
38
- name : " Run tests"
39
- run : dotnet test --configuration Release --no-build --verbosity normal
39
+ run : dotnet test --configuration Release --no-build --logger "console;verbosity=detailed"
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ public class IntegrationTestsFactory : IAsyncLifetime
15
15
private readonly IContainer _azureSqlEdgeContainer ;
16
16
private readonly IContainer _serviceBusContainer ;
17
17
18
+
19
+
18
20
public IntegrationTestsFactory ( )
19
21
{
20
22
_containersNetwork = new NetworkBuilder ( )
@@ -32,6 +34,7 @@ public IntegrationTestsFactory()
32
34
. WithNetworkAliases ( sqlContainerName )
33
35
. WithWaitStrategy ( Wait . ForUnixContainer ( )
34
36
. UntilMessageIsLogged ( "SQL Server is now ready for client connections." , w => w . WithTimeout ( TimeSpan . FromSeconds ( 10 ) ) ) )
37
+ . WithOutputConsumer ( Consume . DoNotConsumeStdoutAndStderr ( ) )
35
38
. Build ( ) ;
36
39
37
40
_serviceBusContainer = new ContainerBuilder ( )
@@ -46,6 +49,7 @@ public IntegrationTestsFactory()
46
49
. WithNetwork ( _containersNetwork )
47
50
. WithWaitStrategy ( Wait . ForUnixContainer ( )
48
51
. UntilMessageIsLogged ( "Emulator Service is Successfully Up!" , w => w . WithTimeout ( TimeSpan . FromSeconds ( 30 ) ) ) )
52
+ . WithOutputConsumer ( Consume . DoNotConsumeStdoutAndStderr ( ) )
49
53
. Build ( ) ;
50
54
}
51
55
Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . IO ;
2
3
using System . Threading . Tasks ;
3
4
using Azure . Messaging . ServiceBus ;
4
5
using Demo . Tests . Config ;
6
+ using Xunit . Abstractions ;
5
7
6
8
namespace Demo . Tests ;
7
9
8
10
[ Collection ( nameof ( CollectionIntegrationTests ) ) ]
9
- public class Tests ( IntegrationTestsFactory factory )
11
+ public class Tests (
12
+ IntegrationTestsFactory factory ,
13
+ ITestOutputHelper output )
10
14
{
11
15
private readonly IntegrationTestsFactory _factory = factory ;
16
+ private readonly ITestOutputHelper _output = output ;
12
17
13
18
[ Fact ]
14
- public async Task Test ( )
19
+ public async Task Demo_test ( )
15
20
{
16
21
// Arrange
17
22
var queueName = "demo-queue" ;
@@ -32,4 +37,16 @@ public async Task Test()
32
37
// Assert
33
38
Assert . Equal ( message , messageReceived ) ;
34
39
}
40
+
41
+ [ Fact ]
42
+ public void Is_file_Exists ( )
43
+ {
44
+ // Arrange && Act
45
+ var path = Path . GetFullPath ( "./Config/ServiceBusEmulator.Config.json" ) ;
46
+
47
+
48
+ // Assert
49
+ _output . WriteLine ( $ "Path: { path } -> Exists: { File . Exists ( path ) } ") ;
50
+ Assert . True ( File . Exists ( path ) ) ;
51
+ }
35
52
}
You can’t perform that action at this time.
0 commit comments