Exemple #1
0
 public async Task NotDeleteOrganizationsThatDoNotMatchOrganizationIdOnCommand()
 {
     var command = new DeleteOrganization { Id = 999 };
     var handler = new DeleteOrganizationHandler(Context);
     await handler.Handle(command);
     Assert.Equal(2, Context.Organizations.Count());
 }
Exemple #2
0
 public async Task DeleteOrganizationThatMatchesOrganizationIdOnCommand()
 {
     var command = new DeleteOrganization { Id = 1 };
     var handler = new DeleteOrganizationHandler(Context);
     await handler.Handle(command);
     var data = Context.Organizations.Count(_ => _.Id == 1);
     Assert.Equal(0, data);
 }
        public async Task DeleteTheOrganization()
        {
            var command = new DeleteOrganization { Id = 1 };

            var handler = new DeleteOrganizationHandler(Context);
            await handler.Handle(command);

            Assert.False(Context.Organizations.Any(x => x.Id == command.Id));
        }
        public async Task DeleteTheOrganization()
        {
            var command = new DeleteOrganization {
                Id = 1
            };

            var handler = new DeleteOrganizationHandler(Context);
            await handler.Handle(command);

            Assert.False(Context.Organizations.Any(x => x.Id == command.Id));
        }