public async Task MarksWorkspacesAsInaccessible()
            {
                prepareDatabase(new[]
                {
                    new MockWorkspace {
                        Id = 1
                    },
                    new MockWorkspace {
                        Id = 2
                    },
                    new MockWorkspace {
                        Id = 3
                    }
                });

                var inaccessibleWorkspaces = new[]
                {
                    new MockWorkspace {
                        Id = 1
                    }
                };

                var fetchObservables = Substitute.For <IFetchObservables>();

                var state       = new MarkWorkspacesAsInaccessibleState(dataSource);
                var stateParams = new MarkWorkspacesAsInaccessibleParams(inaccessibleWorkspaces, fetchObservables);

                await state.Start(stateParams);

                await dataSource.Received()
                .Update(Arg.Is <IThreadSafeWorkspace>(workspace => workspace.Id == 1 && workspace.IsInaccessible));
            }
            public async Task ReturnsFetchObservablesAsParameterOfTransition()
            {
                prepareDatabase(new[]
                {
                    new MockWorkspace {
                        Id = 1
                    },
                    new MockWorkspace {
                        Id = 2
                    },
                    new MockWorkspace {
                        Id = 3
                    }
                });

                var inaccessibleWorkspaces = new[]
                {
                    new MockWorkspace {
                        Id = 1
                    },
                };

                var fetchObservables = Substitute.For <IFetchObservables>();

                var state       = new MarkWorkspacesAsInaccessibleState(dataSource);
                var stateParams = new MarkWorkspacesAsInaccessibleParams(inaccessibleWorkspaces, fetchObservables);

                var transition = await state.Start(stateParams);

                var parameter = ((Transition <IFetchObservables>)transition).Parameter;

                parameter.Should().Be(fetchObservables);
            }