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