public void GetsItemsFromRepositoryWhenInstantiated()
        {
            var getCallRegisteredByRepository = false;
            _repository.GetCalled += (sender, args) => { getCallRegisteredByRepository = true; };

            var viewModel = new LegendViewModel(_repository);

            Assert.IsTrue(getCallRegisteredByRepository);
        }
        public void DisposesRepository()
        {
            var disposeCallRegisteredByRepository = false;
            _repository.DisposeCalled += (sender, args) => { disposeCallRegisteredByRepository = true; };

            var viewModel = new LegendViewModel(_repository);

            Assert.IsTrue(disposeCallRegisteredByRepository);
        }
        public void FillsItemsFromRepositoryIntoCollection()
        {
            var viewModel = new LegendViewModel(_repository);

            CollectionAssert.AreEquivalent(_items, viewModel.Reasons.ToArray());
        }