mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
* Add support for RetainHandling. * Add support for No Local. * Add support for _SubscriptionIdentifier_. * Add more Unit Tests. * Update docs.
27 lines
958 B
C#
27 lines
958 B
C#
using System.Threading.Tasks;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using MQTTnet.Client;
|
|
using MQTTnet.Formatter;
|
|
|
|
namespace MQTTnet.Tests.Server
|
|
{
|
|
[TestClass]
|
|
public sealed class Shared_Subscriptions_Tests : BaseTestClass
|
|
{
|
|
[TestMethod]
|
|
public async Task Server_Reports_Shared_Subscriptions_Not_Supported()
|
|
{
|
|
using (var testEnvironment = CreateTestEnvironment(MqttProtocolVersion.V500))
|
|
{
|
|
await testEnvironment.StartServer();
|
|
|
|
var client = testEnvironment.CreateClient();
|
|
var connectResult = await client.ConnectAsync(testEnvironment.Factory.CreateClientOptionsBuilder()
|
|
.WithProtocolVersion(MqttProtocolVersion.V500)
|
|
.WithTcpServer("127.0.0.1", testEnvironment.ServerPort).Build());
|
|
|
|
Assert.IsFalse(connectResult.SharedSubscriptionAvailable);
|
|
}
|
|
}
|
|
}
|
|
} |