I'm trying to understand one in terms of how it compares to the other.
Is white box testing where you can see the code and black box testing where you don't look at the code?
I'm trying to understand one in terms of how it compares to the other.
Is white box testing where you can see the code and black box testing where you don't look at the code?
basicaly yes.
in black box testing you test if the expected input to your object produces expected output without the ability to change the underlying code.
in white box testing you can see the code and you test all possible paths through it.
Yeah, you pretty much have it. Black box is testing the externals without knowledge (or access) of/to anything internal. White box testing is being able to look at (and perhaps modify) the internal state of what you are testing. They both have different uses. Unit tests are most often (but not always) white box tests.
Wikipedia:
White box testing uses an internal perspective of the system to design test cases based on internal structure. It requires programming skills to identify all paths through the software.
versus
Black box testing takes an external perspective of the test object to derive test cases.