public async Task GetSponsorByName_Should_Throw_ArgumentNullException_If_Name_Is_Null()
        {
            SponsorServiceMock mock = SponsorServiceMock.Create();

            string name = null;

            await Assert.ThrowsAsync <ArgumentNullException>(() => mock.GetSponsorByName(name));

            mock.SponsorRepository.Verify(repository => repository.GetSponsorByName(It.IsAny <string>()), Times.Never);
        }
        public async Task GetSponsorByName_Should_Call_ISponsorRepository_GetSponsorByName()
        {
            SponsorServiceMock mock = SponsorServiceMock.Create();

            var name = "armut.com";

            mock.SponsorRepository
            .Setup(repository => repository.GetSponsorByName(It.Is <string>(s => s == name)))
            .ReturnsAsync(() => new Sponsor()
            {
                Id = 1, Name = name
            });

            Sponsor sponsor = await mock.GetSponsorByName(name);

            mock.SponsorRepository.Verify(repository => repository.GetSponsorByName(It.IsAny <string>()), Times.Once);
            Assert.NotNull(sponsor);
        }