initial version

This commit is contained in:
JanEggers
2017-10-22 19:22:14 +02:00
parent 41edc3a1ec
commit d10f29bbc6
42 changed files with 580 additions and 487 deletions
@@ -0,0 +1,30 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MQTTnet.Core.Tests
{
[TestClass]
public class ServiceCollectionTest
{
[TestMethod]
public void TestCanConstructAllServices()
{
var services = new ServiceCollection()
.AddLogging()
.AddMqttServer()
.AddMqttClient();
var serviceProvider = services
.BuildServiceProvider();
foreach (var service in services)
{
if (service.ServiceType.IsGenericType)
{
continue;
}
serviceProvider.GetRequiredService(service.ServiceType);
}
}
}
}