diff options
Diffstat (limited to 'BackEnd/Timeline.Tests/Helpers/TestApplication.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/Helpers/TestApplication.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/Helpers/TestApplication.cs b/BackEnd/Timeline.Tests/Helpers/TestApplication.cs index e0db966c..723ef500 100644 --- a/BackEnd/Timeline.Tests/Helpers/TestApplication.cs +++ b/BackEnd/Timeline.Tests/Helpers/TestApplication.cs @@ -1,6 +1,8 @@ using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.Collections.Generic;
using System.IO;
@@ -46,5 +48,10 @@ namespace Timeline.Tests.Helpers Directory.Delete(WorkDirectory, true);
}
+
+ public TestServer Server
+ {
+ get => (TestServer)Host.Services.GetRequiredService<IServer>();
+ }
}
}
|