public void SetsSyncStatusToSyncNeeded(long defaultWorkspaceId) { var interactor = new SetDefaultWorkspaceInteractor(TimeService, DataSource.User, defaultWorkspaceId); interactor.Execute().Wait(); DataSource.User.Received().Update(Arg.Is <IThreadSafeUser>(user => user.SyncStatus == SyncStatus.SyncNeeded)).Wait(); }
public void SetsTheDefaultWorkspaceId(long defaultWorkspaceId) { var interactor = new SetDefaultWorkspaceInteractor(TimeService, DataSource.User, defaultWorkspaceId); interactor.Execute().Wait(); DataSource.User.Received().Update(Arg.Is <IThreadSafeUser>(user => user.DefaultWorkspaceId == defaultWorkspaceId)).Wait(); }
public void SetsAtToCurrentTime(DateTimeOffset now) { TimeService.CurrentDateTime.Returns(now); var interactor = new SetDefaultWorkspaceInteractor(TimeService, DataSource.User, 12); interactor.Execute().Wait(); DataSource.User.Received().Update(Arg.Is <IThreadSafeUser>(user => user.At == now)).Wait(); }