Ejemplo n.º 1
0
            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);
            }
Ejemplo n.º 2
0
            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);
            }