public async void CreateCustomElectionUnitTest() { // Arrange var mockElectionRepository = GetElectionRepositoryMock(); var createElectionSetup = new CreateElectionSetup(); createElectionSetup.SetupMock(mockElectionRepository); var election = new Election { ElectionQr = Guid.NewGuid(), CreatedDate = DateTime.UtcNow }; var electionService = new ElectionService(mockElectionRepository.Object); // Act Election result = await electionService.AddAsync(election); // Assert Assert.True(result.Id > 0); Assert.Null(result.Ballots); }