Example #1
0
        public void EndOpenLogFile_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<byte[]>.Success("SOMETOKEN", new byte[10]);

            sut.EndOpenLogFile(completed);

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