// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschraenkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using System; using FakeItEasy; using Squidex.Infrastructure.Orleans; using Xunit; #pragma warning disable RECS0026 // Possible unassigned object created by 'new' #pragma warning disable CA1806 // Do not ignore method results namespace Squidex.Domain.Apps.Entities.Contents { public class ContentDomainObjectGrainTests { private readonly IActivationLimit limit = A.Fake(); [Fact] public void Should_set_limit() { var serviceProvider = A.Fake(); A.CallTo(() => serviceProvider.GetService(typeof(ContentDomainObject))) .Returns(A.Dummy()); new ContentDomainObjectGrain(serviceProvider, limit); A.CallTo(() => limit.SetLimit(5000, TimeSpan.FromMinutes(5))) .MustHaveHappened(); } } }