public void People_OnFetchData_IsPopulated()
        {
            var viewModel = new PeopleViewModel();

            viewModel.FetchData();

            Assert.IsNotNull(viewModel.People);
            Assert.AreEqual(2, viewModel.People.Count());
        }
        public void RepositoryType_OnCreation_ReturnsFakeRepoString()
        {
            var viewModel      = new PeopleViewModel();
            var expectedString = "PersonRepository.Fake.FakeRepository";

            viewModel.FetchData();

            Assert.AreEqual(expectedString, viewModel.RepositoryType);
        }
        public void People_OnClearData_IsEmpty()
        {
            var viewModel = new PeopleViewModel();

            viewModel.FetchData();

            viewModel.ClearData();

            Assert.AreEqual(0, viewModel.People.Count());
        }
        public void People_OnFetchData_IsPopulated()
        {
            //Arrange
            PeopleViewModel peopleViewModel = new PeopleViewModel();

            //Act
            peopleViewModel.FetchData();

            //Assert
            Assert.IsNotNull(peopleViewModel.People);
            Assert.AreEqual(2, peopleViewModel.People.Count());
        }
Esempio n. 5
0
        public void People_OnClearData_IsEmpty()
        {
            //Assert
            var viewModel = new PeopleViewModel();

            viewModel.FetchData();
            Assert.AreEqual(2, viewModel.People.Count(), "Invalid Arrangement");

            //Act
            viewModel.ClearData();

            //Assert
            Assert.AreEqual(0, viewModel.People.Count());
        }