Default hot body subscriptions to live delivery
This commit is contained in:
parent
fd070cc8b2
commit
4d2ddb5beb
3 changed files with 27 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using System.IO.MemoryMappedFiles;
|
||||
|
|
@ -381,6 +382,22 @@ public sealed class CultMeshBodyTransportTests
|
|||
subscription.ConsumerRuntimeId.Should().Be("eve-unity");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void HotBodySubscriptionsDefaultToEphemeralLiveDelivery()
|
||||
{
|
||||
var overloads = typeof(CultMesh).GetMethods()
|
||||
.Where(method => method.Name == nameof(CultMesh.SubscribeHotBodyAsync))
|
||||
.ToArray();
|
||||
|
||||
overloads.Should().HaveCount(2);
|
||||
foreach (var overload in overloads)
|
||||
{
|
||||
var deliveryMode = overload.GetParameters().Single(parameter =>
|
||||
parameter.ParameterType == typeof(CultNetDatabaseSubscriptionDeliveryMode));
|
||||
deliveryMode.DefaultValue.Should().Be(CultNetDatabaseSubscriptionDeliveryMode.Live);
|
||||
}
|
||||
}
|
||||
|
||||
private static CultMeshBodyValidationRequest Request(CultMeshBodyDescriptor descriptor, DateTimeOffset now) => new()
|
||||
{
|
||||
BodyId = descriptor.BodyId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue