File tree Expand file tree Collapse file tree 4 files changed +30
-3
lines changed
StackExchange.Redis.Tests Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 1
- using System ;
1
+ using StackExchange . Redis . Tests . Helpers ;
2
+ using System ;
2
3
using System . Diagnostics ;
3
4
using System . Threading . Tasks ;
4
5
using Xunit ;
@@ -9,7 +10,11 @@ namespace StackExchange.Redis.Tests.Booksleeve
9
10
public class BookSleeveTestBase
10
11
{
11
12
public ITestOutputHelper Output { get ; }
12
- public BookSleeveTestBase ( ITestOutputHelper output ) => Output = output ;
13
+ public BookSleeveTestBase ( ITestOutputHelper output )
14
+ {
15
+ Output = output ;
16
+ Output . WriteFrameworkVersion ( ) ;
17
+ }
13
18
14
19
static BookSleeveTestBase ( )
15
20
{
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public void CanNotOpenNonsenseConnection_IP()
54
54
[ Fact ]
55
55
public async Task CanNotOpenNonsenseConnection_DNS ( )
56
56
{
57
- await Assert . ThrowsAsync < RedisConnectionException > ( async ( ) =>
57
+ var ex = await Assert . ThrowsAsync < RedisConnectionException > ( async ( ) =>
58
58
{
59
59
var log = new StringWriter ( ) ;
60
60
try
@@ -68,6 +68,7 @@ await Assert.ThrowsAsync<RedisConnectionException>(async () =>
68
68
Output . WriteLine ( log . ToString ( ) ) ;
69
69
}
70
70
} ) . ForAwait ( ) ;
71
+ Output . WriteLine ( ex . ToString ( ) ) ;
71
72
}
72
73
73
74
[ Fact ]
Original file line number Diff line number Diff line change
1
+ using Xunit . Abstractions ;
2
+
3
+ namespace StackExchange . Redis . Tests . Helpers
4
+ {
5
+ public static class Extensions
6
+ {
7
+ public static void WriteFrameworkVersion ( this ITestOutputHelper output )
8
+ {
9
+ #if NET462
10
+ output . WriteLine ( "Compiled under .NET 4.6.2" ) ;
11
+ #elif NETCOREAPP1_0
12
+ output . WriteLine ( "Compiled under .NETCoreApp1.0" ) ;
13
+ #elif NETCOREAPP2_0
14
+ output . WriteLine ( "Compiled under .NETCoreApp2.0" ) ;
15
+ #else
16
+ output . WriteLine ( "Compiled under <unknown framework>" ) ;
17
+ #endif
18
+ }
19
+ }
20
+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public abstract class TestBase : IDisposable
23
23
protected TestBase ( ITestOutputHelper output )
24
24
{
25
25
Output = output ;
26
+ Output . WriteFrameworkVersion ( ) ;
26
27
Writer = new TextWriterOutputHelper ( output ) ;
27
28
socketManager = new SocketManager ( GetType ( ) . Name ) ;
28
29
ClearAmbientFailures ( ) ;
You can’t perform that action at this time.
0 commit comments