public async Task ThrowsExeptionWhenManagerWasNotFound()
        {
            var options = TestUtils.GetOptions(nameof(ThrowsExeptionWhenManagerIsAlreadyAddedToLogbook));

            using (var arrangeContext = new ManagerLogbookContext(options))
            {
                await arrangeContext.Users.AddAsync(TestHelpersLogbook.TestUser01());

                await arrangeContext.Logbooks.AddAsync(TestHelpersLogbook.TestLogbook01());

                await arrangeContext.UsersLogbooks.AddAsync(TestHelpersLogbook.TestUsersLogbooks01());

                await arrangeContext.SaveChangesAsync();
            }

            using (var assertContext = new ManagerLogbookContext(options))
            {
                var mockedBusinessValidator = new Mock <IBusinessValidator>();
                var sut = new LogbookService(assertContext, mockedBusinessValidator.Object);

                var ex = await Assert.ThrowsExceptionAsync <NotFoundException>(() => sut.AddManagerToLogbookAsync("2", TestHelpersLogbook.TestLogbook01().Id));

                Assert.AreEqual(ex.Message, string.Format(ServicesConstants.UserNotFound));
            }
        }
        public async Task Succeed_ReturnLogbookWhenManagerIsAdded()
        {
            var options = TestUtils.GetOptions(nameof(Succeed_ReturnLogbookWhenManagerIsAdded));

            using (var arrangeContext = new ManagerLogbookContext(options))
            {
                await arrangeContext.Users.AddAsync(TestHelpersLogbook.TestUser01());

                await arrangeContext.Users.AddAsync(TestHelpersLogbook.TestUser02());

                await arrangeContext.Logbooks.AddAsync(TestHelpersLogbook.TestLogbook01());

                await arrangeContext.UsersLogbooks.AddAsync(TestHelpersLogbook.TestUsersLogbooks01());

                await arrangeContext.SaveChangesAsync();
            }

            using (var assertContext = new ManagerLogbookContext(options))
            {
                var mockedBusinessValidator = new Mock <IBusinessValidator>();
                var sut = new LogbookService(assertContext, mockedBusinessValidator.Object);

                await sut.AddManagerToLogbookAsync(TestHelpersLogbook.TestUser02().Id, TestHelpersLogbook.TestLogbook01().Id);

                Assert.AreEqual(assertContext.UsersLogbooks.Select(x => x.LogbookId).Count(), 2);
            }
        }