public async Task TracksTheEventWhenUserDoesNotHaveDefaultWorkspace()
        {
            var user = new MockUser();

            user.DefaultWorkspaceId = null;
            fetchObservables.GetSingle <IUser>().Returns(Observable.Return <IUser>(user));

            await state.Start(fetchObservables);

            analyticsService.NoDefaultWorkspace.Received().Track();
        }
Beispiel #2
0
 public IObservable <ITransition> Start(IFetchObservables fetch)
 => fetch.GetSingle <TInterface>()
 .SingleAsync()
 .SelectMany(entity => entity == null
             ? Observable.Return(Unit.Default)
             : dataSource.UpdateWithConflictResolution(convertToThreadsafeEntity(entity)).Select(_ => Unit.Default))
 .Select(_ => FinishedPersisting.Transition(fetch));
Beispiel #3
0
 protected override IObservable <T> FetchObservable(IFetchObservables fetch)
 => fetch.GetSingle <T>();