예제 #1
0
        public void ShouldReReadLogAfterRefresh()
        {
            GivenLogContainsEvents(TestEventFactory.SomeEvents(1));

            WhenEventViewModelsAreLoaded();

            var expected = TestEventFactory.SomeEvents(3);

            _mockLog.Setup(log => log.ReadAll()).Returns(expected);

            _uut.Refresh();
            var actuals = WhenEventViewModelsAreLoaded().Select(vm => vm.Event);

            CollectionAssert.AreEqual(expected, actuals);
        }