Just about all the packages used for electronics components are hermetically sealed. When I assemble circuit boards, I wash them in rubbing alcohol afterwards to remove the flux. If the parts were not sealed, I would not be able to do that.
The one issue is they are not particularly tolerant to shock or abrasion. Being in the washer, they may have suffered a lot of abrasion. Inspect them visually and if you can seen no cracks or dings, they should be fine.
You can also check the resistance with an ohmmeter, should be open circuit (infinite). Higher end meters have a capacitance setting. If your meter has that, you can check the capacitance as well.