public async Task Users_AfterClear_IsEmpty() { // Arrange var dataService = new FakeDataService(); var viewModel = new UserViewModel(dataService); await viewModel.RefreshUsers(); Assert.AreEqual(2, viewModel.Users.Count()); // Act viewModel.ClearUsers(); // Assert Assert.IsNotNull(viewModel.Users); Assert.AreEqual(0, viewModel.Users.Count()); }
private void ClearButton_Click(object sender, RoutedEventArgs e) { viewModel.ClearUsers(); }