Example #1
0
        public void EndListLogFiles_Is_Published()
        {
            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 completed = DomainModel.Response<IEnumerable<string>>.Success("SOMETOKEN", Enumerable.Empty<string>());

            sut.EndListLogFiles(completed);

            A.CallTo(() => _eventBus.Publish(A<object>.That.IsSameAs(completed), A<string>.That.IsEqualTo(completed.Token))).MustHaveHappened(Repeated.Exactly.Once);
        }