Esempio n. 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);
        }
Esempio n. 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);
        }