temperament is GREATLY genetic, this can mainly be decided by looking at the parents, things such as phobias, fears, and even aggression are often genetic predispositions of dogs, so get a look at the parents of any "pure bred" dog you want to purchase.. In my opinion pure bred working breeds should only be bought if they are going to be used for their specific breed characteristics and traits that they were bred for. (it's like buying a hound dog and never letting it sniff or howl, trying to subdue those traits that they have a predisposition to do). So just do some research on whatever breed you're going to do, if you're buying from a "working" bloodline, it won't be a good "Family" pet.
(AMAZINGLY friendly dogs with great temperaments die everyday in shelters because they aren't a "pure bred", you should really check that out :] )