public void People_OnClearPeople_IsEmpty() { IPersonReader reader = new FakeReader(); var viewModel = new PeopleViewModel(reader); viewModel.RefreshPeople(); Assert.AreNotEqual(0, viewModel.People.Count()); viewModel.ClearPeople(); Assert.AreEqual(0, viewModel.People.Count()); }
public void People_OnRefreshPeople_IsPopulated() { IPersonReader reader = new FakeReader(); var viewModel = new PeopleViewModel(reader); viewModel.RefreshPeople(); Assert.IsNotNull(viewModel.People); Assert.AreEqual(2, viewModel.People.Count()); }
public void RefreshPeople_OnExecute_PeopleIsPopulated() { // Arrange IPersonRepository fakeRepository = GetTestPersonRepository(); PeopleViewModel peopleViewModel = new PeopleViewModel(fakeRepository); // Act peopleViewModel.RefreshPeople(); // Assert Assert.IsNotNull(peopleViewModel.People); Assert.AreEqual(2, peopleViewModel.People.Count()); }
public void RefreshPeople_OnExecute_PeopleIsPopulated() { // Arrange var viewModel = new PeopleViewModel(GetTestRepository()); // Act viewModel.RefreshPeople(); // Assert Assert.IsNotNull(viewModel.People); Assert.AreEqual(2, viewModel.People.Count()); }
public void People_OnRefreshPeople_IsPopulated() { //Arrange var reader = new FakeReader(); var viewModel = new PeopleViewModel(reader); //Act viewModel.RefreshPeople(); //Assert Assert.IsNotNull(viewModel); Assert.AreEqual(2, viewModel.People.Count()); }
public void RefreshPeople_OnExecute_PeopleIsPopulated() { // Arrange var reader = GetTestReader(); var vm = new PeopleViewModel(reader); // Act vm.RefreshPeople(); // Assert Assert.IsNotNull(vm.People); Assert.AreEqual(2, vm.People.Count()); }
public void RefreshPeople_OnExecute_PeopleIsPopulated() { // Arrange var repository = GetFakeRepository(); var vm = new PeopleViewModel(repository); // Constructor Injection of a Fake Repository // Act vm.RefreshPeople(); // Assert Assert.IsNotNull(vm.People); Assert.AreEqual(2, vm.People.Count()); }
public void People_OnClearPeople_IsEmpty() { //Arrange var reader = new FakeReader(); var viewModel = new PeopleViewModel(reader); viewModel.RefreshPeople(); Assert.AreNotEqual(0, viewModel.People.Count(), "Invalid arrange"); //Act viewModel.ClearPeople(); //Assert Assert.AreEqual(0, viewModel.People.Count()); }
public void People_OnRefreshPeople_IsPopulated() { // Arrange (set up) var dataReader = new FakeReader(); var peopleViewModel = new PeopleViewModel(dataReader); // Act peopleViewModel.RefreshPeople(); // Assert Assert.IsNotNull(peopleViewModel.People); Assert.AreEqual(2, peopleViewModel.People.Count()); }
public async Task RefreshPeople_OnExecute_PeopleIsPopulated() { // Arrange var repository = GetTestReader(); var vm = new PeopleViewModel(repository); // Act await vm.RefreshPeople(); // Assert Assert.IsNotNull(vm.People); Assert.AreEqual(2, vm.People.Count()); }
public void KorangaMoonjiTEst() { //arrange var reader = new MockReader(); var mockviewModel = new PeopleViewModel(reader); mockviewModel.RefreshPeople(); //act mockviewModel.ClearPeople(); //assert Assert.AreEqual(0, mockviewModel.People.Count()); }
public void ClearPeople_OnExecute_PeopleIsEmpty() { // Arrange var reader = GetTestReader(); var vm = new PeopleViewModel(reader); vm.RefreshPeople(); Assert.AreEqual(2, vm.People.Count(), "Invalid Arrangement"); // Act vm.ClearPeople(); // Assert Assert.AreEqual(0, vm.People.Count()); }
public void ClearPeople_OnExecute_PeopleIsEmpty() { // Arrange var repository = GetFakeRepository(); var vm = new PeopleViewModel(repository); // Constructor Injection of a Fake Repository vm.RefreshPeople(); Assert.AreEqual(2, vm.People.Count(), "Invalid Arrangement"); // Act vm.ClearPeople(); // Assert Assert.AreEqual(0, vm.People.Count()); }
public void People_OnClearPeople_IsEmpty() { // Arrange (set up) var dataReader = new FakeReader(); var peopleViewModel = new PeopleViewModel(dataReader); peopleViewModel.RefreshPeople(); // just to be sure that the People property was cleared properly... Assert.AreNotEqual(0, peopleViewModel.People.Count(), "Invalid Arrangement"); // Act peopleViewModel.ClearPeople(); // Assert Assert.AreEqual(0, peopleViewModel.People.Count()); }
public void ClearPeople_OnExecute_PeopleIsEmpty() { // Arrange IPersonReader reader = readerMock.Object; var vm = new PeopleViewModel(reader); vm.RefreshPeople(); Assert.AreEqual(2, vm.People.Count()); // Act vm.ClearPeople(); // Assert Assert.AreEqual(0, vm.People.Count()); }
private void FetchButton_Click(object sender, RoutedEventArgs e) { viewModel.RefreshPeople(); ShowRepositoryType(); }