public void ShouldBeTrueRegardlessOfWhetherOrNotAProjectWithTheSameNameExistsInTheSameWorkspace(bool configureForSameWorkspace) { saveEnabledObserver = TestScheduler.CreateObserver <bool>(); SetupDataSourceToReturnExistingProjectsAndDefaultWorkspace(dataSourceProjectIsInSameWorkspace: configureForSameWorkspace); var viewModel = CreateViewModel(); viewModel.Save.Enabled.Subscribe(saveEnabledObserver); TestScheduler.Start(); viewModel.Name.Accept(ProjectName); TestScheduler.Start(); saveEnabledObserver.LastEmittedValue().Should().Be(true); }
public void ShouldAlwaysReturnTrueEvenWhenWorkspaceChanges(string projectName) { saveEnabledObserver = TestScheduler.CreateObserver <bool>(); SetupDataSourceToReturnMultipleWorkspaces(); var viewModel = CreateViewModel(); viewModel.Save.Enabled.Subscribe(saveEnabledObserver); TestScheduler.Start(); viewModel.Name.Accept(projectName); TestScheduler.Start(); viewModel.PickWorkspace.Execute(); TestScheduler.Start(); saveEnabledObserver.LastEmittedValue().Should().Be(true); }