public async Task FullCombo_SimpleActivity() { var userId = (int)UserVariations.Super; //Write content, get content. var user = await searcher.GetById <UserView>(RequestType.user, userId); var page = GetNewPageView(); var writtenPage = await writer.WriteAsync(page, userId); //this is NOT a super user //Now if we wait for the new data from the beginning, we should get a collection with certain values in it... var liveData = await queue.ListenAsync(user, -1, safetySource.Token); Assert.True(liveData.optimized); Assert.True(liveData.lastId > 0, "LiveData didn't return a positive lastId after an event was clearly retrieved!"); Assert.Single(liveData.events); Assert.Equal(liveData.lastId, liveData.events.Max(x => x.id)); Assert.Contains(EventType.activity_event, liveData.objects.Keys); //Go find the activity we're pointing to... var activity = await GetActivityForContentAsync(writtenPage.id); //Note: we don't have to get too technical with the event tests, because we already tested to see if the writer is emitting appropriate events. This is just testing //to see if we GET the events we expect Assert.Equal(UserAction.create, liveData.events.First().action); Assert.Equal(activity.First().id, liveData.events.First().refId); Assert.Equal(userId, liveData.events.First().userId); AssertSimpleActivityListenResult(liveData.objects[EventType.activity_event], writtenPage, activity.First()); }