name constraint check: add unit tests

This commit adds unit test for |ThrowForUserNameConstraints|. All lines
are covered by test now.

Tested: unit test passed

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: If1a0ff823ca0767f068030f205efdc1eb33e3029
2 files changed