예제 #1
0
        public async Task Handle_DontIncludeUnpublished()
        {
            var request = new ListAllLogbookEntries(presenter);

            var result = await interactor.Handle(request, CancellationToken.None);

            result.IsSuccessful.Should().BeTrue();
            var viewModel = presenter.GetViewModel();

            viewModel.LogbookItems.Should().HaveCount(1);
        }
예제 #2
0
        public async Task Handle_IncludeUnpublished()
        {
            var request = new ListAllLogbookEntries(presenter);

            A.CallTo(() => currentUser.GetIsTauchboldOrAdminAsync())
            .ReturnsLazily(() => Task.FromResult(true));

            var result = await interactor.Handle(request, CancellationToken.None);

            result.IsSuccessful.Should().BeTrue();
            var viewModel = presenter.GetViewModel();

            viewModel.LogbookItems.Should().HaveCount(2);
        }