When you're running the unit tests, the entry assembly will be the test hosting shell. That could be something useless like the nunit.exe assembly, or if you're using a binary test harness (e.g. Visual Studio itself), it will be null. (See the documentation for GetEntryAssembly
You should either use GetExecutingAssembly, if that's what you actually want to know in the general case (i.e. if someone links to your assembly, do you want the location of your assembly still?), or accept that something like this which is making assumptions about environment (i.e. that a particular assembly will be the primary entry point) is intrinsically not unit testable and not worry about it.
Considering it's a one line call to an external dependency (the Framework) which you can assume is well tested, I don't think you need a (pseudo-)unit test for this property anyway.