public void CanExecuteIsTrueByDefault() { var viewModel = new LoadTestViewModel(); var command = new RunLoadTestCommand(viewModel); Assert.IsTrue(command.CanExecute(null)); }
public void ShouldUpdateViewModel() { var viewModel = new LoadTestViewModel { SelectedTestType = typeof(InMemoryTest100), Configuration = new LoadTestConfiguration { NumberOfThreads = 1, Duration = TimeSpan.FromSeconds(1) } }; var runLoadTestCommand = new RunLoadTestCommand(viewModel); runLoadTestCommand.Execute(null); WaitForLoadTestResult(viewModel); Assert.IsNotNull(viewModel.Heartbeat); Assert.IsNotNull(viewModel.Heartbeats); Assert.IsTrue(viewModel.Heartbeats.Any()); }
public void ThrowIfViewModelIsNull() { var runLoadTestCommand = new RunLoadTestCommand(null); Assert.IsNull(runLoadTestCommand); }