public void CampaignDoesNotExist()
 {
     var context = ServiceProvider.GetService<AllReadyContext>();
     var query = new DeleteCampaignCommand { CampaignId = 0 };
     var handler = new DeleteCampaignCommandHandler(context);
     var result = handler.Handle(query);
 }
 public async Task CampaignDoesNotExist()
 {
     var context = ServiceProvider.GetService<AllReadyContext>();
     var command = new DeleteCampaignCommand { CampaignId = 0 };
     var handler = new DeleteCampaignCommandHandler(context);
     await handler.Handle(command);
 }
        public async Task NotDeleteAnExistingCampaignWithNonMatchingCampaignId()
        {
            var command = new DeleteCampaignCommand { CampaignId = 2 };
            var handler = new DeleteCampaignCommandHandler(Context);
            await handler.Handle(command);

            var result = Context.Campaigns.Count();
            Assert.Equal(1, result);
        }
        public async Task ExistingCampaign()
        {
            var command = new DeleteCampaignCommand { CampaignId = 1 };
            var handler = new DeleteCampaignCommandHandler(Context);
            await handler.Handle(command);

            var data = Context.Campaigns.Count(_ => _.Id == 1);
            Assert.Equal(0, data);
        }
        public async Task ExistingCampaign()
        {
            var context = ServiceProvider.GetService<AllReadyContext>();
            var command = new DeleteCampaignCommand { CampaignId = 1 };
            var handler = new DeleteCampaignCommandHandler(context);
            await handler.Handle(command);

            var data = context.Campaigns.Count(_ => _.Id == 1);
            Assert.Equal(0, data);
        }
        public void ExistingCampaign()
        {
            var context = ServiceProvider.GetService<AllReadyContext>();
            var query = new DeleteCampaignCommand { CampaignId = 1 };
            var handler = new DeleteCampaignCommandHandler(context);
            var result = handler.Handle(query);

            var data = context.Campaigns.Count(_ => _.Id == 1);
            Assert.Equal(0, data);
        }
 public async Task CampaignDoesNotExist()
 {
     var command = new DeleteCampaignCommand { CampaignId = 0 };
     var handler = new DeleteCampaignCommandHandler(Context);
     await handler.Handle(command);
 }