Exemplo n.º 1
0
        public async Task People_OnRefreshPeople_IsPopulated()
        {
            // Arrange
            var repository = new FakeRepository();
            var viewModel  = new PeopleReaderViewModel(repository);

            // Act
            await viewModel.RefreshPeople();

            // Assert
            Assert.IsNotNull(viewModel.People);
            Assert.AreEqual(2, viewModel.People.Count());
        }
Exemplo n.º 2
0
        public void RefreshPeople_OnExecute_PeopleIsPopulated()
        {
            // Arrange
            var repository = new FakeRepository();
            var viewModel  = new PeopleViewModel(repository);

            // Act
            viewModel.RefreshPeople();

            // Assert
            Assert.IsNotNull(viewModel.People);
            Assert.AreEqual(2, viewModel.People.Count());
        }
Exemplo n.º 3
0
        public async Task People_OnClearPeople_IsEmpty()
        {
            // Arrange
            var repository = new FakeRepository();
            var viewModel  = new PeopleReaderViewModel(repository);
            await viewModel.RefreshPeople();

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

            // Act
            viewModel.ClearPeople();

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