Example #1
0
        public void Client_Can_Report_Health_Async()
        {
            var sut = new Server.Hubs.RuntimeHub(_eventBus, _clientHealthService, _groupMembershipService, A.Dummy<IHubContext<Server.Hubs.IRuntimeClient>>());
            sut.Context = new HubCallerContext(_request, Guid.NewGuid().ToString().ToLower());
            var healthInfo = new DomainModel.EnvironmentInfo();

            sut.ReportHealth(healthInfo);

            A.CallTo(() => _clientHealthService.RecordHealthAsync(A<ClaimsPrincipal>.Ignored, A<DomainModel.EnvironmentInfo>.That.IsSameAs(healthInfo)))
                .MustHaveHappened(Repeated.Exactly.Once);
        }