Despite previous trends, navy blue and black are generally considered to match. Wearing them close together helps contrast their colors.
Neutral colors such as blue, black and brown almost always pair well together especially if they are dark. Using different textures is an especially good choice, as the variation enhances the contrast. Try to have one color that is more apparent, and make sure the outfit is not an equal mix of colors; one should be more prevalent than the other. A shirt that contains both blue and black is a good way to get comfortable with this color combination.